@cometchat/chat-uikit-react-native 4.3.25 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- 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/android/.settings/org.eclipse.buildship.core.prefs +2 -0
- package/android/src/main/AndroidManifest.xml +0 -6
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatSoundModule.java +29 -44
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +172 -28
- package/android/src/main/java/com/reactnativecometchatuikit/SoundPlayer.java +43 -15
- package/ios/CometchatUiKit.mm +27 -14
- package/ios/FileManager.m +134 -20
- package/ios/SoundPlayer.m +32 -5
- package/package.json +18 -59
- package/react-native-cometchat-ui-kit.podspec +16 -0
- package/src/CometChatConversations/CometChatConversations.tsx +1520 -1293
- package/src/CometChatConversations/Skeleton.tsx +186 -0
- package/src/CometChatConversations/index.ts +7 -21
- package/src/CometChatConversations/resources/index.ts +22 -36
- package/src/CometChatConversations/style.ts +230 -60
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +1032 -659
- package/src/CometChatGroupMembers/Skeleton.tsx +197 -0
- package/src/CometChatGroupMembers/index.ts +2 -8
- package/src/CometChatGroupMembers/resources/index.ts +3 -14
- package/src/CometChatGroupMembers/style.ts +530 -22
- package/src/CometChatGroups/CometChatGroups.tsx +509 -550
- package/src/CometChatGroups/GroupsStyle.ts +179 -109
- package/src/CometChatGroups/Skeleton.tsx +238 -0
- package/src/CometChatGroups/index.ts +3 -11
- package/src/CometChatGroups/resources/index.ts +17 -24
- package/src/CometChatGroups/style.ts +15 -16
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +730 -1058
- package/src/CometChatMessageComposer/index.ts +4 -8
- package/src/CometChatMessageComposer/resources/index.ts +21 -31
- package/src/CometChatMessageComposer/styles.tsx +152 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +370 -482
- package/src/CometChatMessageHeader/index.ts +3 -15
- package/src/CometChatMessageHeader/listners.ts +50 -26
- package/src/CometChatMessageHeader/styles.ts +57 -10
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +333 -316
- package/src/CometChatMessageInformation/Skeleton.tsx +143 -0
- package/src/CometChatMessageInformation/index.ts +5 -9
- package/src/CometChatMessageInformation/resources/index.ts +1 -4
- package/src/CometChatMessageInformation/styles.ts +147 -16
- package/src/CometChatMessageList/CometChatMessageList.tsx +2464 -2076
- package/src/CometChatMessageList/Skeleton.tsx +98 -0
- package/src/CometChatMessageList/index.ts +5 -12
- package/src/CometChatMessageList/resources/index.ts +13 -20
- package/src/CometChatMessageList/style.ts +989 -51
- package/src/CometChatThreadHeader/CometChatThreadHeader.tsx +274 -0
- package/src/CometChatThreadHeader/Header.tsx +47 -0
- package/src/CometChatThreadHeader/index.ts +8 -0
- package/src/CometChatThreadHeader/resources/index.ts +14 -0
- package/src/CometChatThreadHeader/style.ts +70 -0
- package/src/CometChatUsers/CometChatUsers.tsx +436 -122
- package/src/CometChatUsers/Skeleton.tsx +210 -0
- package/src/CometChatUsers/index.ts +3 -11
- package/src/CometChatUsers/style.ts +184 -0
- package/src/calls/CallEvents.ts +9 -9
- package/src/calls/CallUtils.ts +102 -31
- package/src/calls/CallingConfiguration.ts +23 -4
- package/src/calls/CallingExtension.tsx +43 -40
- package/src/calls/CallingExtensionDecorator.tsx +418 -0
- package/src/calls/CallingPackage.ts +11 -12
- package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +121 -52
- package/src/calls/CometChatCallBubble/index.ts +8 -13
- package/src/calls/CometChatCallBubble/resources/index.ts +1 -8
- package/src/calls/CometChatCallBubble/styles.ts +155 -22
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +19 -36
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +321 -323
- package/src/calls/CometChatCallButtons/index.ts +9 -11
- package/src/calls/CometChatCallButtons/style.ts +34 -12
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +571 -376
- package/src/calls/CometChatCallLogs/Skeleton.tsx +227 -0
- package/src/calls/CometChatCallLogs/index.ts +5 -15
- package/src/calls/CometChatCallLogs/resources/index.ts +20 -31
- package/src/calls/CometChatCallLogs/style.ts +207 -18
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +278 -222
- package/src/calls/CometChatIncomingCall/index.ts +7 -9
- package/src/calls/CometChatIncomingCall/resources/index.ts +3 -12
- package/src/calls/CometChatIncomingCall/style.ts +75 -0
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +74 -56
- package/src/calls/CometChatOngoingCall/index.ts +3 -7
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +225 -176
- package/src/calls/CometChatOutgoingCall/OutgoingCallConfiguration.ts +31 -31
- package/src/calls/CometChatOutgoingCall/index.ts +5 -11
- package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -4
- package/src/calls/CometChatOutgoingCall/styles.ts +58 -0
- package/src/calls/index.ts +14 -88
- package/src/calls/resources/index.ts +1 -8
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +72 -96
- package/src/extensions/CollaborativeBubble/resources/index.ts +2 -4
- package/src/extensions/CollaborativeBubble/style.ts +112 -0
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtension.tsx +21 -35
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +246 -189
- package/src/extensions/CollaborativeDocument/index.ts +2 -8
- package/src/extensions/CollaborativeDocument/resources/index.ts +4 -6
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.tsx +25 -35
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +323 -197
- package/src/extensions/CollaborativeWhiteboard/index.ts +2 -8
- package/src/extensions/CollaborativeWhiteboard/resources/index.ts +4 -6
- package/src/extensions/ExtensionConstants.tsx +3 -4
- package/src/extensions/ExtensionModerator.tsx +47 -47
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +187 -116
- package/src/extensions/LinkPreview/LinkPreviewExtension.tsx +22 -0
- package/src/extensions/LinkPreview/LinkPreviewExtensionDecorator.tsx +94 -0
- package/src/extensions/LinkPreview/index.ts +6 -16
- package/src/extensions/LinkPreview/resources/index.ts +1 -4
- package/src/extensions/LinkPreview/style.ts +100 -0
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +112 -116
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +238 -154
- package/src/extensions/MessageTranslation/MessageTranslationExtension.tsx +7 -25
- package/src/extensions/MessageTranslation/index.ts +3 -5
- package/src/extensions/MessageTranslation/resources/index.ts +2 -3
- package/src/extensions/Polls/Header.tsx +56 -21
- package/src/extensions/Polls/Polls.tsx +368 -332
- package/src/extensions/Polls/PollsBubble.tsx +250 -205
- package/src/extensions/Polls/PollsConfigurations.ts +0 -9
- package/src/extensions/Polls/PollsDecorator.tsx +164 -72
- package/src/extensions/Polls/PollsExtension.tsx +5 -12
- package/src/extensions/Polls/index.ts +6 -8
- package/src/extensions/Polls/resources/index.ts +6 -12
- package/src/extensions/Polls/style.ts +185 -1
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +249 -115
- package/src/extensions/Stickers/CometChatStickerKeyboard/Skeleton.tsx +167 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -6
- package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +58 -64
- package/src/extensions/Stickers/CometChatStickerKeyboard/index.ts +2 -3
- package/src/extensions/Stickers/CometChatStickerKeyboard/style.ts +67 -41
- package/src/extensions/Stickers/StickerConfiguration.ts +5 -9
- package/src/extensions/Stickers/StickersBubble.tsx +22 -46
- package/src/extensions/Stickers/StickersExtension.ts +5 -6
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +307 -103
- package/src/extensions/Stickers/index.ts +7 -9
- package/src/extensions/Stickers/resources/index.ts +1 -4
- package/src/extensions/Stickers/style.ts +53 -0
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +83 -64
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.tsx +5 -25
- package/src/extensions/ThumbnailGeneration/index.ts +1 -3
- package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -4
- package/src/extensions/index.ts +11 -50
- package/src/index.ts +194 -688
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +342 -486
- package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +147 -117
- package/src/shared/CometChatUiKit/UIKitSettings.ts +38 -38
- package/src/shared/CometChatUiKit/index.ts +2 -6
- package/src/shared/assets/images/index.ts +13 -29
- package/src/shared/base/BaseStyle.ts +9 -8
- package/src/shared/base/BorderStyle.ts +4 -4
- package/src/shared/base/FontStyle.ts +25 -3
- package/src/shared/base/ShadowStyle.ts +1 -1
- package/src/shared/base/Types.ts +45 -26
- package/src/shared/base/index.ts +7 -25
- package/src/shared/base/vars.ts +5 -5
- package/src/shared/constants/UIKitConstants.ts +322 -294
- package/src/shared/events/CometChatMessageEvents/index.ts +83 -87
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +260 -238
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +412 -377
- package/src/shared/events/CometChatUIEvents.ts +15 -16
- package/src/shared/events/ListenerInitializer.ts +79 -80
- package/src/shared/events/conversations.ts +2 -2
- package/src/shared/events/groups.ts +8 -8
- package/src/shared/events/index.ts +6 -6
- package/src/shared/events/messages.ts +26 -29
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +191 -121
- package/src/shared/formatters/CometChatMentionsFormatter/MentionTextStyle.ts +3 -3
- package/src/shared/formatters/CometChatMentionsFormatter/index.ts +3 -6
- package/src/shared/formatters/CometChatTextFormatter.ts +15 -14
- package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +127 -131
- package/src/shared/formatters/index.ts +7 -8
- package/src/shared/framework/ChatConfigurator.ts +3 -4
- package/src/shared/framework/DataSource.ts +225 -92
- package/src/shared/framework/DataSourceDecorator.tsx +316 -233
- package/src/shared/framework/ExtensionsDataSource.tsx +8 -11
- package/src/shared/framework/MessageDataSource.tsx +1556 -857
- package/src/shared/framework/index.ts +8 -6
- package/src/shared/framework/resources/index.ts +37 -57
- package/src/shared/helper/Toast.tsx +20 -18
- package/src/shared/helper/dateHelper.ts +138 -0
- package/src/shared/helper/functions.js +1 -1
- package/src/shared/helper/helperFunctions.ts +71 -19
- package/src/shared/helper/types/index.ts +49 -15
- package/src/shared/helper/useKeyboard.tsx +12 -23
- package/src/shared/icons/Icon.tsx +73 -0
- package/src/shared/icons/components/ListItemCheck.tsx +18 -0
- package/src/shared/icons/components/StickerBase-icon.tsx +16 -0
- package/src/shared/icons/components/account-circle-fill.tsx +26 -0
- package/src/shared/icons/components/account-circle.tsx +11 -0
- package/src/shared/icons/components/activity.tsx +20 -0
- package/src/shared/icons/components/add-a-photo-fill.tsx +26 -0
- package/src/shared/icons/components/add-a-photo.tsx +11 -0
- package/src/shared/icons/components/add-box-fill.tsx +26 -0
- package/src/shared/icons/components/add-box.tsx +11 -0
- package/src/shared/icons/components/add-call-fill.tsx +26 -0
- package/src/shared/icons/components/add-call.tsx +11 -0
- package/src/shared/icons/components/add-circle-fill.tsx +11 -0
- package/src/shared/icons/components/add-circle.tsx +11 -0
- package/src/shared/icons/components/add-comment-fill.tsx +26 -0
- package/src/shared/icons/components/add-comment.tsx +11 -0
- package/src/shared/icons/components/add-fill.tsx +26 -0
- package/src/shared/icons/components/add-reaction-fill.tsx +26 -0
- package/src/shared/icons/components/add-reaction.tsx +11 -0
- package/src/shared/icons/components/add.tsx +11 -0
- package/src/shared/icons/components/ai-conversation-summary-fill.tsx +13 -0
- package/src/shared/icons/components/ai-conversation-summary.tsx +13 -0
- package/src/shared/icons/components/ai-fill.tsx +11 -0
- package/src/shared/icons/components/ai-suggest-reply-fill.tsx +13 -0
- package/src/shared/icons/components/ai-suggest-reply.tsx +20 -0
- package/src/shared/icons/components/ai.tsx +12 -0
- package/src/shared/icons/components/alternate-email-fill.tsx +26 -0
- package/src/shared/icons/components/alternate-email.tsx +11 -0
- package/src/shared/icons/components/animals-&-nature.tsx +18 -0
- package/src/shared/icons/components/archive-fill.tsx +26 -0
- package/src/shared/icons/components/archive.tsx +11 -0
- package/src/shared/icons/components/arrow-back-fill.tsx +26 -0
- package/src/shared/icons/components/arrow-back.tsx +11 -0
- package/src/shared/icons/components/arrow-forward-fill.tsx +26 -0
- package/src/shared/icons/components/arrow-forward.tsx +11 -0
- package/src/shared/icons/components/attach-file-fill.tsx +26 -0
- package/src/shared/icons/components/attach-file.tsx +11 -0
- package/src/shared/icons/components/audio-file-type.tsx +36 -0
- package/src/shared/icons/components/bar-chart-fill.tsx +11 -0
- package/src/shared/icons/components/bar-chart.tsx +11 -0
- package/src/shared/icons/components/base-icon.tsx +16 -0
- package/src/shared/icons/components/bedtime-fill.tsx +26 -0
- package/src/shared/icons/components/bedtime.tsx +11 -0
- package/src/shared/icons/components/block-fill.tsx +26 -0
- package/src/shared/icons/components/block.tsx +11 -0
- package/src/shared/icons/components/bookmark-add-fill.tsx +26 -0
- package/src/shared/icons/components/bookmark-add.tsx +11 -0
- package/src/shared/icons/components/bookmark-fill.tsx +26 -0
- package/src/shared/icons/components/bookmark.tsx +11 -0
- package/src/shared/icons/components/calendar-add-on-fill.tsx +26 -0
- package/src/shared/icons/components/calendar-add-on.tsx +11 -0
- package/src/shared/icons/components/calendar-today-fill.tsx +26 -0
- package/src/shared/icons/components/calendar-today.tsx +11 -0
- package/src/shared/icons/components/call-end-fill.tsx +26 -0
- package/src/shared/icons/components/call-end.tsx +11 -0
- package/src/shared/icons/components/call-fill.tsx +26 -0
- package/src/shared/icons/components/call-log-fill.tsx +26 -0
- package/src/shared/icons/components/call-log.tsx +11 -0
- package/src/shared/icons/components/call-made-fill.tsx +26 -0
- package/src/shared/icons/components/call-made.tsx +11 -0
- package/src/shared/icons/components/call-missed-fill.tsx +26 -0
- package/src/shared/icons/components/call-missed-outgoing-fill.tsx +26 -0
- package/src/shared/icons/components/call-missed-outgoing.tsx +11 -0
- package/src/shared/icons/components/call-missed.tsx +11 -0
- package/src/shared/icons/components/call-received-fill.tsx +26 -0
- package/src/shared/icons/components/call-received.tsx +11 -0
- package/src/shared/icons/components/call.tsx +11 -0
- package/src/shared/icons/components/cancel-fill.tsx +26 -0
- package/src/shared/icons/components/cancel.tsx +11 -0
- package/src/shared/icons/components/change-circle-fill.tsx +11 -0
- package/src/shared/icons/components/change-circle.tsx +11 -0
- package/src/shared/icons/components/chat-bot-fill.tsx +13 -0
- package/src/shared/icons/components/chat-bot.tsx +17 -0
- package/src/shared/icons/components/chat-fill.tsx +26 -0
- package/src/shared/icons/components/chat.tsx +11 -0
- package/src/shared/icons/components/check-circle-fill.tsx +11 -0
- package/src/shared/icons/components/check-circle.tsx +11 -0
- package/src/shared/icons/components/check-fill.tsx +26 -0
- package/src/shared/icons/components/check.tsx +11 -0
- package/src/shared/icons/components/chevron-left-fill.tsx +26 -0
- package/src/shared/icons/components/chevron-left.tsx +11 -0
- package/src/shared/icons/components/chevron-right-fill.tsx +26 -0
- package/src/shared/icons/components/chevron-right.tsx +11 -0
- package/src/shared/icons/components/close-fill.tsx +26 -0
- package/src/shared/icons/components/close.tsx +11 -0
- package/src/shared/icons/components/collaborative-document-fill.tsx +17 -0
- package/src/shared/icons/components/collaborative-document-icon.tsx +11 -0
- package/src/shared/icons/components/collaborative-document.tsx +13 -0
- package/src/shared/icons/components/collaborative-whiteboard-fill.tsx +15 -0
- package/src/shared/icons/components/collaborative-whiteboard-icon.tsx +15 -0
- package/src/shared/icons/components/collaborative-whiteboard.tsx +12 -0
- package/src/shared/icons/components/content-copy-fill.tsx +26 -0
- package/src/shared/icons/components/content-copy.tsx +11 -0
- package/src/shared/icons/components/crop-fill.tsx +26 -0
- package/src/shared/icons/components/crop.tsx +11 -0
- package/src/shared/icons/components/delete-fill.tsx +26 -0
- package/src/shared/icons/components/delete.tsx +11 -0
- package/src/shared/icons/components/description-fill.tsx +26 -0
- package/src/shared/icons/components/description.tsx +11 -0
- package/src/shared/icons/components/document-file-type.tsx +38 -0
- package/src/shared/icons/components/done-all-fill.tsx +26 -0
- package/src/shared/icons/components/done-all.tsx +11 -0
- package/src/shared/icons/components/download-fill.tsx +26 -0
- package/src/shared/icons/components/download.tsx +11 -0
- package/src/shared/icons/components/edit-calendar-fill.tsx +26 -0
- package/src/shared/icons/components/edit-calendar.tsx +11 -0
- package/src/shared/icons/components/edit-fill.tsx +26 -0
- package/src/shared/icons/components/edit-square-fill.tsx +11 -0
- package/src/shared/icons/components/edit-square.tsx +11 -0
- package/src/shared/icons/components/edit.tsx +11 -0
- package/src/shared/icons/components/empty-state.tsx +82 -0
- package/src/shared/icons/components/error-fill.tsx +34 -0
- package/src/shared/icons/components/error-state.tsx +92 -0
- package/src/shared/icons/components/error.tsx +11 -0
- package/src/shared/icons/components/event-available-fill.tsx +11 -0
- package/src/shared/icons/components/event-available.tsx +11 -0
- package/src/shared/icons/components/event-fill.tsx +26 -0
- package/src/shared/icons/components/event.tsx +11 -0
- package/src/shared/icons/components/favorite-fill.tsx +26 -0
- package/src/shared/icons/components/favorite.tsx +11 -0
- package/src/shared/icons/components/filter-list-fill.tsx +26 -0
- package/src/shared/icons/components/filter-list-off-fill.tsx +26 -0
- package/src/shared/icons/components/filter-list-off.tsx +11 -0
- package/src/shared/icons/components/filter-list.tsx +11 -0
- package/src/shared/icons/components/flags.tsx +13 -0
- package/src/shared/icons/components/flip-camera-ios-fill.tsx +26 -0
- package/src/shared/icons/components/flip-camera-ios.tsx +11 -0
- package/src/shared/icons/components/food-&-drink.tsx +18 -0
- package/src/shared/icons/components/forward-fill.tsx +26 -0
- package/src/shared/icons/components/forward.tsx +11 -0
- package/src/shared/icons/components/gif-fill.tsx +13 -0
- package/src/shared/icons/components/gif.tsx +12 -0
- package/src/shared/icons/components/graphic-eq-fill.tsx +11 -0
- package/src/shared/icons/components/graphic-eq.tsx +11 -0
- package/src/shared/icons/components/group-add.tsx +11 -0
- package/src/shared/icons/components/group-fill.tsx +26 -0
- package/src/shared/icons/components/group.tsx +11 -0
- package/src/shared/icons/components/help-fill.tsx +26 -0
- package/src/shared/icons/components/help.tsx +11 -0
- package/src/shared/icons/components/history-fill.tsx +26 -0
- package/src/shared/icons/components/history.tsx +11 -0
- package/src/shared/icons/components/image-file-type.tsx +35 -0
- package/src/shared/icons/components/incoming-audio-fill.tsx +11 -0
- package/src/shared/icons/components/incoming-audio.tsx +13 -0
- package/src/shared/icons/components/incoming-video-fill.tsx +28 -0
- package/src/shared/icons/components/incoming-video.tsx +15 -0
- package/src/shared/icons/components/info-fill.tsx +26 -0
- package/src/shared/icons/components/info.tsx +11 -0
- package/src/shared/icons/components/keep-fill.tsx +26 -0
- package/src/shared/icons/components/keep-off-fill.tsx +26 -0
- package/src/shared/icons/components/keep-off.tsx +11 -0
- package/src/shared/icons/components/keep.tsx +11 -0
- package/src/shared/icons/components/keyboard-arrow-down-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard-arrow-down.tsx +11 -0
- package/src/shared/icons/components/keyboard-arrow-up-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard-arrow-up.tsx +11 -0
- package/src/shared/icons/components/keyboard-fill.tsx +26 -0
- package/src/shared/icons/components/keyboard.tsx +11 -0
- package/src/shared/icons/components/language-fill.tsx +26 -0
- package/src/shared/icons/components/language.tsx +11 -0
- package/src/shared/icons/components/link-fill.tsx +26 -0
- package/src/shared/icons/components/link.tsx +11 -0
- package/src/shared/icons/components/loading-fill.tsx +12 -0
- package/src/shared/icons/components/loading.tsx +12 -0
- package/src/shared/icons/components/location-on-fill.tsx +26 -0
- package/src/shared/icons/components/location-on.tsx +11 -0
- package/src/shared/icons/components/lock-fill.tsx +26 -0
- package/src/shared/icons/components/lock-open-fill.tsx +26 -0
- package/src/shared/icons/components/lock-open.tsx +11 -0
- package/src/shared/icons/components/lock.tsx +11 -0
- package/src/shared/icons/components/logout-fill.tsx +11 -0
- package/src/shared/icons/components/logout.tsx +11 -0
- package/src/shared/icons/components/mail-fill.tsx +26 -0
- package/src/shared/icons/components/mail.tsx +11 -0
- package/src/shared/icons/components/mic-fill.tsx +26 -0
- package/src/shared/icons/components/mic-off-fill.tsx +26 -0
- package/src/shared/icons/components/mic-off.tsx +11 -0
- package/src/shared/icons/components/mic.tsx +11 -0
- package/src/shared/icons/components/missed-video-call-fill.tsx +26 -0
- package/src/shared/icons/components/missed-video-call.tsx +11 -0
- package/src/shared/icons/components/mood-fill.tsx +26 -0
- package/src/shared/icons/components/mood.tsx +11 -0
- package/src/shared/icons/components/more-vert-fill.tsx +26 -0
- package/src/shared/icons/components/more-vert.tsx +11 -0
- package/src/shared/icons/components/near-me-fill.tsx +11 -0
- package/src/shared/icons/components/near-me.tsx +11 -0
- package/src/shared/icons/components/no-photography-fill.tsx +26 -0
- package/src/shared/icons/components/no-photography.tsx +11 -0
- package/src/shared/icons/components/notifications-fill.tsx +26 -0
- package/src/shared/icons/components/notifications-off-fill.tsx +26 -0
- package/src/shared/icons/components/notifications-off.tsx +11 -0
- package/src/shared/icons/components/notifications.tsx +11 -0
- package/src/shared/icons/components/objects.tsx +20 -0
- package/src/shared/icons/components/outgoing-audio-fill.tsx +15 -0
- package/src/shared/icons/components/outgoing-audio.tsx +15 -0
- package/src/shared/icons/components/outgoing-video-fill.tsx +28 -0
- package/src/shared/icons/components/outgoing-video.tsx +15 -0
- package/src/shared/icons/components/pause-fill.tsx +26 -0
- package/src/shared/icons/components/pause.tsx +11 -0
- package/src/shared/icons/components/pdf-file-type.tsx +36 -0
- package/src/shared/icons/components/person-add-fill.tsx +26 -0
- package/src/shared/icons/components/person-add.tsx +11 -0
- package/src/shared/icons/components/person-fill.tsx +26 -0
- package/src/shared/icons/components/person-off.tsx +16 -0
- package/src/shared/icons/components/person.tsx +11 -0
- package/src/shared/icons/components/phone-in-talk-fill.tsx +26 -0
- package/src/shared/icons/components/phone-in-talk.tsx +11 -0
- package/src/shared/icons/components/phone-incoming-fill.tsx +11 -0
- package/src/shared/icons/components/phone-incoming.tsx +11 -0
- package/src/shared/icons/components/phone-missed-fill.tsx +26 -0
- package/src/shared/icons/components/phone-missed.tsx +11 -0
- package/src/shared/icons/components/phone-outgoing-fill.tsx +15 -0
- package/src/shared/icons/components/phone-outgoing.tsx +15 -0
- package/src/shared/icons/components/photo-camera-fill.tsx +26 -0
- package/src/shared/icons/components/photo-camera.tsx +11 -0
- package/src/shared/icons/components/photo-fill.tsx +26 -0
- package/src/shared/icons/components/photo.tsx +11 -0
- package/src/shared/icons/components/play-arrow-fill.tsx +26 -0
- package/src/shared/icons/components/play-arrow.tsx +11 -0
- package/src/shared/icons/components/play-circle-fill.tsx +26 -0
- package/src/shared/icons/components/play-circle.tsx +11 -0
- package/src/shared/icons/components/poll-Icon.tsx +10 -0
- package/src/shared/icons/components/poll-fill.tsx +11 -0
- package/src/shared/icons/components/poll.tsx +11 -0
- package/src/shared/icons/components/presentation-file-type.tsx +38 -0
- package/src/shared/icons/components/rearrange-fill.tsx +13 -0
- package/src/shared/icons/components/rearrange.tsx +13 -0
- package/src/shared/icons/components/refresh-fill.tsx +26 -0
- package/src/shared/icons/components/refresh.tsx +11 -0
- package/src/shared/icons/components/reply-all-fill.tsx +26 -0
- package/src/shared/icons/components/reply-all.tsx +11 -0
- package/src/shared/icons/components/reply-fill.tsx +26 -0
- package/src/shared/icons/components/reply.tsx +11 -0
- package/src/shared/icons/components/retry-fill.tsx +11 -0
- package/src/shared/icons/components/retry.tsx +11 -0
- package/src/shared/icons/components/schedule-fill.tsx +26 -0
- package/src/shared/icons/components/schedule.tsx +11 -0
- package/src/shared/icons/components/screen-share-fill.tsx +26 -0
- package/src/shared/icons/components/screen-share.tsx +11 -0
- package/src/shared/icons/components/search-fill.tsx +26 -0
- package/src/shared/icons/components/search.tsx +11 -0
- package/src/shared/icons/components/send-fill.tsx +26 -0
- package/src/shared/icons/components/send.tsx +11 -0
- package/src/shared/icons/components/settings-fill.tsx +26 -0
- package/src/shared/icons/components/settings.tsx +11 -0
- package/src/shared/icons/components/share-fill.tsx +26 -0
- package/src/shared/icons/components/share.tsx +11 -0
- package/src/shared/icons/components/shield-fill.tsx +11 -0
- package/src/shared/icons/components/shield.tsx +11 -0
- package/src/shared/icons/components/smileys-&-people.tsx +18 -0
- package/src/shared/icons/components/spreadsheet-file-type.tsx +38 -0
- package/src/shared/icons/components/star-fill.tsx +26 -0
- package/src/shared/icons/components/star.tsx +11 -0
- package/src/shared/icons/components/sticker-fill.tsx +12 -0
- package/src/shared/icons/components/sticker.tsx +11 -0
- package/src/shared/icons/components/stop-circle-fill.tsx +26 -0
- package/src/shared/icons/components/stop-circle.tsx +11 -0
- package/src/shared/icons/components/stop-fill.tsx +26 -0
- package/src/shared/icons/components/stop-screen-share-fill.tsx +26 -0
- package/src/shared/icons/components/stop-screen-share.tsx +11 -0
- package/src/shared/icons/components/stop.tsx +11 -0
- package/src/shared/icons/components/subdirectory-arrow-left-fill.tsx +26 -0
- package/src/shared/icons/components/subdirectory-arrow-left.tsx +11 -0
- package/src/shared/icons/components/subdirectory-arrow-right-fill.tsx +26 -0
- package/src/shared/icons/components/subdirectory-arrow-right.tsx +11 -0
- package/src/shared/icons/components/sunny-fill.tsx +26 -0
- package/src/shared/icons/components/sunny.tsx +11 -0
- package/src/shared/icons/components/symbols.tsx +15 -0
- package/src/shared/icons/components/text-file-type.tsx +35 -0
- package/src/shared/icons/components/thumb-down-fill.tsx +26 -0
- package/src/shared/icons/components/thumb-down.tsx +11 -0
- package/src/shared/icons/components/thumb-up-fill.tsx +26 -0
- package/src/shared/icons/components/thumb-up.tsx +11 -0
- package/src/shared/icons/components/translate-fill.tsx +11 -0
- package/src/shared/icons/components/translate.tsx +11 -0
- package/src/shared/icons/components/travel-&-places.tsx +18 -0
- package/src/shared/icons/components/unknown-file-type.tsx +38 -0
- package/src/shared/icons/components/upload-fill.tsx +11 -0
- package/src/shared/icons/components/upload.tsx +11 -0
- package/src/shared/icons/components/user-empty-icon.tsx +26 -0
- package/src/shared/icons/components/video-call-fill.tsx +26 -0
- package/src/shared/icons/components/video-call.tsx +11 -0
- package/src/shared/icons/components/video-file-type.tsx +38 -0
- package/src/shared/icons/components/videocam-fill.tsx +26 -0
- package/src/shared/icons/components/videocam-off-fill.tsx +26 -0
- package/src/shared/icons/components/videocam-off.tsx +11 -0
- package/src/shared/icons/components/videocam.tsx +11 -0
- package/src/shared/icons/components/visibility-off-fill.tsx +11 -0
- package/src/shared/icons/components/visibility-off.tsx +11 -0
- package/src/shared/icons/components/volume-down-fill.tsx +26 -0
- package/src/shared/icons/components/volume-down.tsx +11 -0
- package/src/shared/icons/components/volume-mute-fill.tsx +26 -0
- package/src/shared/icons/components/volume-mute.tsx +11 -0
- package/src/shared/icons/components/volume-off-fill.tsx +26 -0
- package/src/shared/icons/components/volume-off.tsx +11 -0
- package/src/shared/icons/components/volume-up-fill.tsx +26 -0
- package/src/shared/icons/components/volume-up.tsx +11 -0
- package/src/shared/icons/components/warning-fill.tsx +26 -0
- package/src/shared/icons/components/warning.tsx +11 -0
- package/src/shared/icons/components/wifi-fill.tsx +26 -0
- package/src/shared/icons/components/wifi.tsx +11 -0
- package/src/shared/icons/components/zip-file-type.tsx +38 -0
- package/src/shared/icons/components/zoom-in-map-fill.tsx +26 -0
- package/src/shared/icons/components/zoom-in-map.tsx +11 -0
- package/src/shared/icons/components/zoom-out-map-fill.tsx +26 -0
- package/src/shared/icons/components/zoom-out-map.tsx +11 -0
- package/src/shared/icons/icon-mapping.tsx +620 -0
- package/src/shared/index.ts +116 -337
- package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +0 -1
- package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +19 -26
- package/src/shared/libs/ImageZoom/helper.ts +11 -27
- package/src/shared/libs/ImageZoom/index.tsx +4 -7
- package/src/shared/libs/ImageZoom/types/index.ts +7 -17
- package/src/shared/libs/VideoPlayer/VideoResizeMode.js +1 -1
- package/src/shared/modals/CometChatMessageOption.ts +11 -8
- package/src/shared/modals/CometChatMessageTemplate.ts +180 -140
- package/src/shared/modals/index.ts +2 -57
- package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +153 -151
- package/src/shared/resources/CometChatLocalize/index.ts +2 -8
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +446 -316
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +446 -316
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +445 -317
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +446 -316
- package/src/shared/resources/CometChatLocalize/resources/hu/translation.json +445 -316
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +446 -317
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +445 -317
- package/src/shared/resources/CometChatSoundManager/index.ts +1 -2
- package/src/shared/resources/index.ts +1 -9
- package/src/shared/utils/CometChatMessageHelper/index.ts +16 -14
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +50 -0
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +1 -1
- package/src/shared/utils/CometChatMessagePreview/index.ts +1 -5
- package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -4
- package/src/shared/utils/CometChatMessagePreview/style.ts +45 -0
- package/src/shared/utils/CommonUtils.ts +163 -172
- package/src/shared/utils/MessageUtils.tsx +349 -148
- package/src/shared/utils/NetworkUtils.tsx +32 -24
- package/src/shared/utils/PermissionUtil.ts +30 -30
- package/src/shared/utils/conversationUtils.ts +93 -86
- package/src/shared/utils/index.ts +4 -25
- package/src/shared/views/CometChatAICard/CometChatAICard.tsx +100 -66
- package/src/shared/views/CometChatAICard/resources/index.ts +2 -4
- package/src/shared/views/CometChatActionSheet/ActionItem.ts +12 -57
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +68 -249
- package/src/shared/views/CometChatActionSheet/hooks.ts +5 -3
- package/src/shared/views/CometChatActionSheet/index.ts +1 -4
- package/src/shared/views/CometChatActionSheet/resources/index.ts +5 -7
- package/src/shared/views/CometChatActionSheet/style.ts +2 -41
- package/src/shared/views/CometChatAudioBubble/AnimatedAudioWaves.tsx +131 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +211 -189
- package/src/shared/views/CometChatAudioBubble/index.ts +10 -10
- package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -7
- package/src/shared/views/CometChatAudioBubble/style.ts +203 -27
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +46 -103
- package/src/shared/views/CometChatAvatar/index.ts +3 -9
- package/src/shared/views/CometChatAvatar/styles.ts +37 -24
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +46 -53
- package/src/shared/views/CometChatBadge/index.ts +4 -8
- package/src/shared/views/CometChatBadge/styles.ts +29 -16
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +164 -129
- package/src/shared/views/CometChatBottomSheet/index.ts +2 -5
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +174 -110
- package/src/shared/views/CometChatConfirmDialog/index.ts +2 -9
- package/src/shared/views/CometChatConfirmDialog/style.ts +121 -62
- package/src/shared/views/CometChatDate/CometChatDate.tsx +43 -169
- package/src/shared/views/CometChatDate/index.ts +4 -12
- package/src/shared/views/CometChatDate/styles.ts +36 -0
- package/src/shared/views/CometChatDateSeperator/CometChatDateSeparator.tsx +54 -0
- package/src/shared/views/CometChatDateSeperator/index.ts +6 -0
- package/src/shared/views/CometChatDateSeperator/styles.ts +52 -0
- package/src/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.tsx +54 -0
- package/src/shared/views/CometChatDeletedBubble/index.ts +5 -0
- package/src/shared/views/CometChatDeletedBubble/styles.ts +42 -0
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +284 -205
- package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +169 -1405
- package/src/shared/views/CometChatEmojiKeyboard/index.ts +1 -3
- package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -16
- package/src/shared/views/CometChatEmojiKeyboard/style.ts +72 -61
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +227 -167
- package/src/shared/views/CometChatFileBubble/index.ts +10 -6
- package/src/shared/views/CometChatFileBubble/resources/index.ts +1 -6
- package/src/shared/views/CometChatFileBubble/style.ts +120 -47
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +69 -252
- package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +183 -0
- package/src/shared/views/CometChatImageBubble/assets/index.ts +1 -5
- package/src/shared/views/CometChatImageBubble/index.ts +7 -9
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +28 -43
- package/src/shared/views/CometChatImageViewerModal/index.tsx +1 -1
- package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -2
- package/src/shared/views/CometChatList/CometChatList.tsx +696 -726
- package/src/shared/views/CometChatList/Header.tsx +271 -111
- package/src/shared/views/CometChatList/index.ts +7 -4
- package/src/shared/views/CometChatList/resources/index.ts +4 -13
- package/src/shared/views/CometChatList/styles.ts +59 -44
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +221 -261
- package/src/shared/views/CometChatListItem/index.ts +3 -15
- package/src/shared/views/CometChatListItem/style.ts +25 -29
- package/src/shared/views/CometChatMediaRecorder/AnimatingMic.tsx +129 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatAudioPlayer.tsx +115 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.tsx +233 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +359 -284
- package/src/shared/views/CometChatMediaRecorder/Timer.tsx +83 -0
- package/src/shared/views/CometChatMediaRecorder/index.ts +4 -10
- package/src/shared/views/CometChatMediaRecorder/style.ts +69 -23
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +135 -126
- package/src/shared/views/CometChatMessageBubble/index.ts +2 -5
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +78 -105
- package/src/shared/views/CometChatMessageInput/index.ts +10 -3
- package/src/shared/views/CometChatMessageInput/styles.ts +2 -2
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +77 -71
- package/src/shared/views/CometChatQuickReactions/QuickReactionsStyle.tsx +33 -33
- package/src/shared/views/CometChatQuickReactions/index.ts +4 -5
- package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -2
- package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +477 -308
- package/src/shared/views/CometChatReactionList/ReactionListStyle.tsx +152 -64
- package/src/shared/views/CometChatReactionList/Skeleton.tsx +143 -0
- package/src/shared/views/CometChatReactionList/index.ts +6 -5
- package/src/shared/views/CometChatReactionList/resources/index.ts +1 -4
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +132 -172
- package/src/shared/views/CometChatReactions/index.ts +7 -14
- package/src/shared/views/CometChatReactions/style.ts +193 -41
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +85 -82
- package/src/shared/views/CometChatReceipt/index.ts +3 -11
- package/src/shared/views/CometChatReceipt/resources/blue-double-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/error.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/grey-double-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/grey-tick-icon.png +0 -0
- package/src/shared/views/CometChatReceipt/resources/index.ts +5 -10
- package/src/shared/views/CometChatReceipt/resources/sending.png +0 -0
- package/src/shared/views/CometChatReceipt/style.ts +50 -9
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +67 -63
- package/src/shared/views/CometChatStatusIndicator/index.ts +6 -22
- package/src/shared/views/CometChatStatusIndicator/private.png +0 -0
- package/src/shared/views/CometChatStatusIndicator/protected.png +0 -0
- package/src/shared/views/CometChatStatusIndicator/styles.ts +59 -14
- package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +97 -56
- package/src/shared/views/CometChatSuggestionList/Skeleton.tsx +185 -0
- package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +44 -46
- package/src/shared/views/CometChatSuggestionList/index.ts +3 -7
- package/src/shared/views/CometChatSuggestionList/style.ts +69 -0
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +121 -96
- package/src/shared/views/CometChatTextBubble/index.ts +8 -7
- package/src/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.tsx +202 -0
- package/src/shared/views/CometChatTooltipMenu/index.ts +4 -0
- package/src/shared/views/CometChatTooltipMenu/styles.ts +24 -0
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +175 -195
- package/src/shared/views/CometChatVideoBubble/index.ts +7 -9
- package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -7
- package/src/shared/views/CometChatVideoBubble/style.ts +101 -5
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +154 -91
- package/src/shared/views/CometChatVideoPlayer/index.tsx +1 -1
- package/src/shared/views/ErrorEmptyView/ErrorEmptyView.tsx +62 -0
- package/src/shared/views/index.ts +74 -218
- package/src/theme/CometChatThemeHelper.ts +427 -0
- package/src/theme/context.ts +20 -0
- package/src/theme/default/color/dark.ts +99 -0
- package/src/theme/default/color/light.ts +105 -0
- package/src/theme/default/index.ts +242 -0
- package/src/theme/default/resources/icons/Base_Icon.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_1x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_2x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_document_3x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_1x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_2x.png +0 -0
- package/src/theme/default/resources/icons/collaborative_whiteboard_3x.png +0 -0
- package/src/theme/default/resources/icons/dark_error_icon.png +0 -0
- package/src/theme/default/resources/icons/index.ts +19 -0
- package/src/theme/default/resources/icons/light_error_icon.png +0 -0
- package/src/theme/default/resources/icons/thread_replies.png +0 -0
- package/src/theme/default/spacing.ts +86 -0
- package/src/theme/default/typography.ts +184 -0
- package/src/theme/hook.ts +19 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/provider.tsx +135 -0
- package/src/theme/type.ts +446 -0
- package/screenshots/logo.png +0 -0
- package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +0 -166
- package/src/AI/AIAssistBot/AIAssistBotExtension.tsx +0 -22
- package/src/AI/AIAssistBot/AIAssistBotStyle.ts +0 -43
- package/src/AI/AIAssistBot/AIAssistBotView.tsx +0 -297
- package/src/AI/AIAssistBot/configuration.ts +0 -23
- package/src/AI/AIAssistBot/resources/CloseIcon.png +0 -0
- package/src/AI/AIAssistBot/resources/index.ts +0 -6
- package/src/AI/AIBaseConfiguration.ts +0 -15
- package/src/AI/AIBaseStyle.ts +0 -58
- package/src/AI/AIConversationStarter/AIConversationStarter.ts +0 -19
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +0 -249
- package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +0 -14
- package/src/AI/AIConversationStarter/configuration.ts +0 -11
- package/src/AI/AIConversationStarter/style.ts +0 -74
- package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +0 -179
- package/src/AI/AIConversationSummary/AIConversationSummaryExtension.ts +0 -21
- package/src/AI/AIConversationSummary/AIConversationSummaryStyle.tsx +0 -20
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +0 -195
- package/src/AI/AIConversationSummary/configuration.ts +0 -14
- package/src/AI/AIConversationSummary/resources/index.ts +0 -6
- package/src/AI/AIExtensionDataSource.ts +0 -18
- package/src/AI/AIOptionsStyle.ts +0 -14
- package/src/AI/AISmartReplies/AISmartReplies.ts +0 -19
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +0 -306
- package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +0 -16
- package/src/AI/AISmartReplies/configuration.ts +0 -12
- package/src/AI/CardView.tsx +0 -83
- package/src/AI/CardViewStyle.ts +0 -37
- package/src/AI/resources/ai-empty.png +0 -0
- package/src/AI/resources/ai-error.png +0 -0
- package/src/AI/resources/index.ts +0 -12
- package/src/AI/resources/spineer.png +0 -0
- package/src/AI/style.ts +0 -165
- package/src/AI/utils.ts +0 -39
- package/src/CometChatAddMembers/AddMembersConfiguration.tsx +0 -58
- package/src/CometChatAddMembers/CometChatAddMembers.tsx +0 -114
- package/src/CometChatAddMembers/index.ts +0 -10
- package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +0 -61
- package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +0 -148
- package/src/CometChatBannedMembers/index.ts +0 -13
- package/src/CometChatBannedMembers/resources/clear.png +0 -0
- package/src/CometChatBannedMembers/resources/index.ts +0 -4
- package/src/CometChatContacts/CometChatContacts.tsx +0 -229
- package/src/CometChatContacts/ContactsConfiguration.tsx +0 -69
- package/src/CometChatContacts/ContactsStyle.ts +0 -60
- package/src/CometChatContacts/Header.tsx +0 -167
- package/src/CometChatContacts/index.ts +0 -13
- package/src/CometChatContacts/styles.ts +0 -105
- package/src/CometChatConversations/ConversationsConfiguration.ts +0 -226
- package/src/CometChatConversations/ConversationsStyle.ts +0 -88
- package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +0 -229
- package/src/CometChatConversationsWithMessages/index.ts +0 -6
- package/src/CometChatConversationsWithMessages/resources/index.ts +0 -6
- package/src/CometChatConversationsWithMessages/resources/start.png +0 -0
- package/src/CometChatConversationsWithMessages/styles.ts +0 -15
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +0 -382
- package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +0 -36
- package/src/CometChatCreateGroup/Header.tsx +0 -60
- package/src/CometChatCreateGroup/index.ts +0 -15
- package/src/CometChatCreateGroup/resources/close.png +0 -0
- package/src/CometChatCreateGroup/resources/index.ts +0 -11
- package/src/CometChatCreateGroup/resources/rightTick.png +0 -0
- package/src/CometChatCreateGroup/resources/warning.png +0 -0
- package/src/CometChatCreateGroup/style.ts +0 -44
- package/src/CometChatDetails/CometChatDetails.tsx +0 -1026
- package/src/CometChatDetails/DetailsConfiguration.tsx +0 -72
- package/src/CometChatDetails/Header.tsx +0 -42
- package/src/CometChatDetails/index.ts +0 -19
- package/src/CometChatDetails/listners.ts +0 -109
- package/src/CometChatDetails/resources/close.png +0 -0
- package/src/CometChatDetails/resources/index.ts +0 -17
- package/src/CometChatDetails/styles.ts +0 -23
- package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +0 -118
- package/src/CometChatGroupMembers/GroupMemberStyle.ts +0 -91
- package/src/CometChatGroupMembers/GroupScopeStyle.ts +0 -68
- package/src/CometChatGroups/GroupsConfiguration.ts +0 -93
- package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +0 -231
- package/src/CometChatGroupsWithMessages/index.ts +0 -6
- package/src/CometChatGroupsWithMessages/resources/index.ts +0 -5
- package/src/CometChatGroupsWithMessages/resources/write.png +0 -0
- package/src/CometChatGroupsWithMessages/styles.ts +0 -15
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +0 -268
- package/src/CometChatJoinProtectedGroup/Header.tsx +0 -52
- package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +0 -30
- package/src/CometChatJoinProtectedGroup/index.ts +0 -15
- package/src/CometChatJoinProtectedGroup/resources/close.png +0 -0
- package/src/CometChatJoinProtectedGroup/resources/index.ts +0 -8
- package/src/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
- package/src/CometChatJoinProtectedGroup/style.ts +0 -11
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +0 -96
- package/src/CometChatMessageComposer/styles.ts +0 -28
- package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +0 -62
- package/src/CometChatMessageHeader/resources/Back.png +0 -0
- package/src/CometChatMessageHeader/resources/index.ts +0 -11
- package/src/CometChatMessageHeader/resources/password.png +0 -0
- package/src/CometChatMessageHeader/resources/private.png +0 -0
- package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +0 -32
- package/src/CometChatMessageInformation/MessageInformationStyle.ts +0 -12
- package/src/CometChatMessageList/MessageListConfiguration.ts +0 -250
- package/src/CometChatMessageList/MessageListStyle.ts +0 -75
- package/src/CometChatMessages/CometChatMessages.tsx +0 -344
- package/src/CometChatMessages/MessageStyle.ts +0 -34
- package/src/CometChatMessages/MessagesConfiguration.ts +0 -55
- package/src/CometChatMessages/index.ts +0 -16
- package/src/CometChatMessages/resources/index.ts +0 -6
- package/src/CometChatMessages/resources/info.png +0 -0
- package/src/CometChatMessages/style.ts +0 -23
- package/src/CometChatTabs/CometChatTabs.tsx +0 -178
- package/src/CometChatTabs/CometChatTabsStyle.ts +0 -45
- package/src/CometChatTabs/TabItemStyle.ts +0 -55
- package/src/CometChatTabs/TabItems.ts +0 -11
- package/src/CometChatTabs/index.ts +0 -6
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +0 -349
- package/src/CometChatThreadedMessages/Header.tsx +0 -57
- package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +0 -45
- package/src/CometChatThreadedMessages/index.ts +0 -15
- package/src/CometChatThreadedMessages/resources/Back.png +0 -0
- package/src/CometChatThreadedMessages/resources/close.png +0 -0
- package/src/CometChatThreadedMessages/resources/index.ts +0 -20
- package/src/CometChatThreadedMessages/resources/password.png +0 -0
- package/src/CometChatThreadedMessages/resources/private.png +0 -0
- package/src/CometChatThreadedMessages/resources/right-arrow.png +0 -0
- package/src/CometChatThreadedMessages/style.ts +0 -29
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +0 -145
- package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +0 -60
- package/src/CometChatTransferOwnership/index.ts +0 -14
- package/src/CometChatUsers/UsersConfiguration.tsx +0 -59
- package/src/CometChatUsers/UsersStyle.ts +0 -101
- package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +0 -130
- package/src/CometChatUsersWithMessages/index.ts +0 -6
- package/src/CometChatUsersWithMessages/styles.ts +0 -15
- package/src/calls/CallingDetailsUtils.tsx +0 -158
- package/src/calls/CallingExtentionDecorator.tsx +0 -222
- package/src/calls/CometChatCallBubble/CallBubbleConfiguration.ts +0 -23
- package/src/calls/CometChatCallBubble/CallBubbleStyle.ts +0 -47
- package/src/calls/CometChatCallButtons/CallButtonStyle.ts +0 -35
- package/src/calls/CometChatCallButtons/resources/Call.png +0 -0
- package/src/calls/CometChatCallButtons/resources/Video.png +0 -0
- package/src/calls/CometChatCallButtons/resources/index.ts +0 -9
- package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +0 -118
- package/src/calls/CometChatCallLogDetails/CallLogDetailsStyle.ts +0 -36
- package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +0 -309
- package/src/calls/CometChatCallLogDetails/index.ts +0 -23
- package/src/calls/CometChatCallLogDetails/resources/CloseIcon.png +0 -0
- package/src/calls/CometChatCallLogDetails/resources/index.ts +0 -5
- package/src/calls/CometChatCallLogDetails/style.ts +0 -15
- package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +0 -67
- package/src/calls/CometChatCallLogHistory/CallLogHistoryStyle.ts +0 -46
- package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +0 -350
- package/src/calls/CometChatCallLogHistory/index.ts +0 -23
- package/src/calls/CometChatCallLogHistory/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Call.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Info.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Selection.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Spineer.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Video.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/check.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/index.ts +0 -42
- package/src/calls/CometChatCallLogHistory/resources/missedcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/missedvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/style.ts +0 -24
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +0 -63
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsStyle.ts +0 -59
- package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +0 -221
- package/src/calls/CometChatCallLogParticipants/index.ts +0 -23
- package/src/calls/CometChatCallLogParticipants/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogParticipants/resources/index.ts +0 -5
- package/src/calls/CometChatCallLogParticipants/style.ts +0 -24
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +0 -65
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsStyle.ts +0 -63
- package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +0 -254
- package/src/calls/CometChatCallLogRecordings/index.ts +0 -23
- package/src/calls/CometChatCallLogRecordings/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/index.ts +0 -8
- package/src/calls/CometChatCallLogRecordings/style.ts +0 -24
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +0 -89
- package/src/calls/CometChatCallLogs/CallLogsStyle.ts +0 -95
- package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +0 -10
- package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +0 -56
- package/src/calls/CometChatCallLogsWithDetails/index.ts +0 -5
- package/src/calls/CometChatCallLogsWithDetails/style.ts +0 -11
- package/src/calls/CometChatIncomingCall/IncomingCallStyle.ts +0 -75
- package/src/calls/CometChatIncomingCall/styles.ts +0 -10
- package/src/calls/CometChatOngoingCall/OngoingCallStyle.ts +0 -25
- package/src/calls/CometChatOutgoingCall/OutgoingCallStyle.ts +0 -39
- package/src/extensions/CollaborativeBubble/CollaborativeBubbleStyle.ts +0 -97
- package/src/extensions/CollaborativeBubble/styles.ts +0 -82
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +0 -26
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +0 -26
- package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +0 -82
- package/src/extensions/ImageModeration/ImageModerationExtension.tsx +0 -43
- package/src/extensions/ImageModeration/ImageModerationFilter.tsx +0 -145
- package/src/extensions/ImageModeration/index.ts +0 -18
- package/src/extensions/ImageModeration/resources/index.ts +0 -4
- package/src/extensions/ImageModeration/resources/unsafe.png +0 -0
- package/src/extensions/LinkPreview/LInkPreviewBubbleStyle.ts +0 -28
- package/src/extensions/LinkPreview/LinkPreviewConfiguration.ts +0 -27
- package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +0 -25
- package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +0 -55
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +0 -144
- package/src/extensions/SmartReplies/SmartRepliesExtension.tsx +0 -52
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +0 -213
- package/src/extensions/SmartReplies/index.ts +0 -7
- package/src/extensions/SmartReplies/resources/close.png +0 -0
- package/src/extensions/SmartReplies/resources/index.ts +0 -6
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardStyle.ts +0 -52
- package/src/extensions/Stickers/StickerStyle.ts +0 -15
- package/src/extensions/TextModeration/TextModerationConfiguration.tsx +0 -25
- package/src/extensions/TextModeration/TextModerationExtension.tsx +0 -51
- package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +0 -93
- package/src/extensions/TextModeration/index.ts +0 -6
- package/src/shared/CometChatContext.tsx +0 -43
- package/src/shared/helper/SwipeRow.js +0 -944
- package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +0 -229
- package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +0 -90
- package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +0 -108
- package/src/shared/libs/CometChatCalendar/Calendars/Providers.tsx +0 -27
- package/src/shared/libs/CometChatCalendar/Calendars/index.ts +0 -3
- package/src/shared/libs/CometChatCalendar/Components/Arrow.tsx +0 -46
- package/src/shared/libs/CometChatCalendar/Components/Day.tsx +0 -95
- package/src/shared/libs/CometChatCalendar/Components/Days.tsx +0 -110
- package/src/shared/libs/CometChatCalendar/Components/Month.tsx +0 -47
- package/src/shared/libs/CometChatCalendar/Components/Months.tsx +0 -79
- package/src/shared/libs/CometChatCalendar/Components/Title.tsx +0 -47
- package/src/shared/libs/CometChatCalendar/Components/Weekdays.tsx +0 -29
- package/src/shared/libs/CometChatCalendar/Components/index.ts +0 -7
- package/src/shared/libs/CometChatCalendar/Constants/View.ts +0 -4
- package/src/shared/libs/CometChatCalendar/Constants/index.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Contexts/LocaleContext.tsx +0 -7
- package/src/shared/libs/CometChatCalendar/Contexts/ThemeContext.tsx +0 -7
- package/src/shared/libs/CometChatCalendar/Contexts/index.ts +0 -2
- package/src/shared/libs/CometChatCalendar/Entities/ArrowDirections.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Entities/Calendar.ts +0 -26
- package/src/shared/libs/CometChatCalendar/Entities/Components.ts +0 -13
- package/src/shared/libs/CometChatCalendar/Entities/DateProperties.ts +0 -6
- package/src/shared/libs/CometChatCalendar/Entities/Locale.ts +0 -12
- package/src/shared/libs/CometChatCalendar/Entities/Theme.ts +0 -70
- package/src/shared/libs/CometChatCalendar/Entities/index.ts +0 -6
- package/src/shared/libs/CometChatCalendar/Hooks/index.ts +0 -1
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +0 -63
- package/src/shared/libs/CometChatCalendar/Icons/BackArrow.png +0 -0
- package/src/shared/libs/CometChatCalendar/Icons/chevron-left-16.png +0 -0
- package/src/shared/libs/CometChatCalendar/Icons/index.ts +0 -7
- package/src/shared/libs/CometChatCalendar/Locales/index.ts +0 -4
- package/src/shared/libs/CometChatCalendar/Themes/Colors.ts +0 -31
- package/src/shared/libs/CometChatCalendar/Themes/DarkTheme.ts +0 -79
- package/src/shared/libs/CometChatCalendar/Themes/DefaultTheme.ts +0 -164
- package/src/shared/libs/CometChatCalendar/Themes/index.ts +0 -3
- package/src/shared/libs/CometChatCalendar/Utils/addOpacity.ts +0 -15
- package/src/shared/libs/CometChatCalendar/Utils/checkChangedProps.ts +0 -10
- package/src/shared/libs/CometChatCalendar/Utils/clamp.ts +0 -5
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +0 -23
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +0 -25
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +0 -20
- package/src/shared/libs/CometChatCalendar/Utils/index.ts +0 -6
- package/src/shared/libs/CometChatCalendar/index.ts +0 -5
- package/src/shared/libs/VideoPlayer/Video.js +0 -494
- package/src/shared/libs/VideoPlayerControls/OSSupport/PlatformSupport.tsx +0 -43
- package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +0 -17
- package/src/shared/libs/VideoPlayerControls/OSSupport/index.tsx +0 -1
- package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +0 -512
- package/src/shared/libs/VideoPlayerControls/assets/img/back.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/bottom-vignette@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/error-icon@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/expand@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/forward@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/loader-icon@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/pause@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/play@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/rewind@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/shrink@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/top-vignette@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume@2x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/assets/img/volume@3x.png +0 -0
- package/src/shared/libs/VideoPlayerControls/components/Back/Back.tsx +0 -28
- package/src/shared/libs/VideoPlayerControls/components/Back/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/BottomControls.tsx +0 -142
- package/src/shared/libs/VideoPlayerControls/components/Control.tsx +0 -45
- package/src/shared/libs/VideoPlayerControls/components/Error/Error.tsx +0 -22
- package/src/shared/libs/VideoPlayerControls/components/Error/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Error/styles.ts +0 -21
- package/src/shared/libs/VideoPlayerControls/components/Fullscreen.tsx +0 -36
- package/src/shared/libs/VideoPlayerControls/components/Loader/Loader.tsx +0 -15
- package/src/shared/libs/VideoPlayerControls/components/Loader/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Loader/styles.ts +0 -16
- package/src/shared/libs/VideoPlayerControls/components/NullControl.tsx +0 -7
- package/src/shared/libs/VideoPlayerControls/components/Overlay.tsx +0 -23
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/PlayPause.tsx +0 -109
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/PlayPause/styles.ts +0 -21
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/Seekbar.tsx +0 -47
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Seekbar/styles.ts +0 -37
- package/src/shared/libs/VideoPlayerControls/components/Timer/Timer.tsx +0 -28
- package/src/shared/libs/VideoPlayerControls/components/Timer/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Timer/styles.ts +0 -12
- package/src/shared/libs/VideoPlayerControls/components/Title.tsx +0 -35
- package/src/shared/libs/VideoPlayerControls/components/TopControls.tsx +0 -110
- package/src/shared/libs/VideoPlayerControls/components/Volume/Volume.tsx +0 -37
- package/src/shared/libs/VideoPlayerControls/components/Volume/index.ts +0 -1
- package/src/shared/libs/VideoPlayerControls/components/Volume/styles.ts +0 -31
- package/src/shared/libs/VideoPlayerControls/components/index.ts +0 -14
- package/src/shared/libs/VideoPlayerControls/components/styles.ts +0 -30
- package/src/shared/libs/VideoPlayerControls/hooks/index.ts +0 -3
- package/src/shared/libs/VideoPlayerControls/hooks/useAnimations.ts +0 -68
- package/src/shared/libs/VideoPlayerControls/hooks/useControlTimeout.tsx +0 -67
- package/src/shared/libs/VideoPlayerControls/hooks/usePanResponders.tsx +0 -96
- package/src/shared/libs/VideoPlayerControls/index.ts +0 -4
- package/src/shared/libs/VideoPlayerControls/styles.ts +0 -19
- package/src/shared/libs/VideoPlayerControls/types.ts +0 -290
- package/src/shared/libs/VideoPlayerControls/utils.ts +0 -76
- package/src/shared/libs/datePickerModal/DateTimePickerModal.android.js +0 -75
- package/src/shared/libs/datePickerModal/DateTimePickerModal.ios.js +0 -363
- package/src/shared/libs/datePickerModal/DateTimePickerModal.js +0 -9
- package/src/shared/libs/datePickerModal/Modal.js +0 -180
- package/src/shared/libs/datePickerModal/index.d.ts +0 -310
- package/src/shared/libs/datePickerModal/index.js +0 -5
- package/src/shared/libs/datePickerModal/utils.js +0 -25
- package/src/shared/libs/luxon/src/datetime.js +0 -2422
- package/src/shared/libs/luxon/src/duration.js +0 -990
- package/src/shared/libs/luxon/src/errors.js +0 -61
- package/src/shared/libs/luxon/src/impl/conversions.js +0 -206
- package/src/shared/libs/luxon/src/impl/diff.js +0 -95
- package/src/shared/libs/luxon/src/impl/digits.js +0 -75
- package/src/shared/libs/luxon/src/impl/english.js +0 -233
- package/src/shared/libs/luxon/src/impl/formats.js +0 -176
- package/src/shared/libs/luxon/src/impl/formatter.js +0 -409
- package/src/shared/libs/luxon/src/impl/invalid.js +0 -14
- package/src/shared/libs/luxon/src/impl/locale.js +0 -542
- package/src/shared/libs/luxon/src/impl/regexParser.js +0 -335
- package/src/shared/libs/luxon/src/impl/tokenParser.js +0 -473
- package/src/shared/libs/luxon/src/impl/util.js +0 -309
- package/src/shared/libs/luxon/src/impl/zoneUtil.js +0 -30
- package/src/shared/libs/luxon/src/info.js +0 -205
- package/src/shared/libs/luxon/src/interval.js +0 -657
- package/src/shared/libs/luxon/src/luxon.js +0 -26
- package/src/shared/libs/luxon/src/package.json +0 -4
- package/src/shared/libs/luxon/src/settings.js +0 -175
- package/src/shared/libs/luxon/src/zone.js +0 -91
- package/src/shared/libs/luxon/src/zones/IANAZone.js +0 -189
- package/src/shared/libs/luxon/src/zones/fixedOffsetZone.js +0 -102
- package/src/shared/libs/luxon/src/zones/invalidZone.js +0 -53
- package/src/shared/libs/luxon/src/zones/systemZone.js +0 -61
- package/src/shared/modals/CometChatCallLogDetailsOptions.ts +0 -23
- package/src/shared/modals/CometChatCallLogDetailsTemplate.ts +0 -16
- package/src/shared/modals/CometChatDetailsOption.ts +0 -24
- package/src/shared/modals/CometChatDetailsTemplate.ts +0 -16
- package/src/shared/modals/CometChatOptions.ts +0 -13
- package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +0 -118
- package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +0 -19
- package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +0 -34
- package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +0 -3
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +0 -69
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +0 -119
- package/src/shared/modals/InteractiveData/InteractiveData/index.ts +0 -2
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +0 -102
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +0 -45
- package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +0 -61
- package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +0 -75
- package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +0 -103
- package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +0 -83
- package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +0 -32
- package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +0 -39
- package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +0 -76
- package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +0 -76
- package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +0 -101
- package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +0 -11
- package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +0 -41
- package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +0 -66
- package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +0 -2
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +0 -143
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +0 -39
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +0 -153
- package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +0 -150
- package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +0 -4
- package/src/shared/modals/InteractiveData/index.ts +0 -30
- package/src/shared/resources/CometChatTheme/CometChatTheme.ts +0 -28
- package/src/shared/resources/CometChatTheme/Palette.ts +0 -584
- package/src/shared/resources/CometChatTheme/Typography.ts +0 -396
- package/src/shared/resources/CometChatTheme/index.ts +0 -2
- package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +0 -124
- package/src/shared/utils/CometChatLiveReactions/LiveReactionstyles.ts +0 -37
- package/src/shared/utils/CometChatLiveReactions/index.ts +0 -1
- package/src/shared/utils/CometChatLiveReactions/resources/heart.png +0 -0
- package/src/shared/utils/CometChatLiveReactions/resources/index.ts +0 -5
- package/src/shared/utils/CometChatLiveReactions/style.ts +0 -8
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +0 -109
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.js +0 -30
- package/src/shared/utils/CometChatMessagePreview/style.js +0 -71
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +0 -399
- package/src/shared/utils/DetailsUtils/resources/Back.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/banIcon.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/close.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/index.ts +0 -23
- package/src/shared/utils/DetailsUtils/resources/kickIcon.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/password.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/private.png +0 -0
- package/src/shared/utils/DetailsUtils/resources/right-arrow.png +0 -0
- package/src/shared/utils/InteractiveMessageUtils.ts +0 -60
- package/src/shared/utils/SchedulerUtils.ts +0 -198
- package/src/shared/utils/TypeUtils.ts +0 -3
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +0 -61
- package/src/shared/views/CometChatAudioBubble/AudioBubbleStyle.ts +0 -43
- package/src/shared/views/CometChatAvatar/AvatarConfiguration.ts +0 -27
- package/src/shared/views/CometChatAvatar/AvatarStyle.ts +0 -57
- package/src/shared/views/CometChatAvatar/resources/default.jpg +0 -0
- package/src/shared/views/CometChatAvatar/resources/index.ts +0 -5
- package/src/shared/views/CometChatBadge/BadgeConfiguration.ts +0 -55
- package/src/shared/views/CometChatBadge/BadgeStyle.ts +0 -39
- package/src/shared/views/CometChatBottomSheet/style.ts +0 -50
- package/src/shared/views/CometChatButton/CometChatButton.tsx +0 -76
- package/src/shared/views/CometChatButton/CometChatButtonStyle.ts +0 -47
- package/src/shared/views/CometChatButton/index.ts +0 -5
- package/src/shared/views/CometChatButton/style.ts +0 -8
- package/src/shared/views/CometChatCard/CometChatCard.tsx +0 -77
- package/src/shared/views/CometChatCard/CometChatCardStyle.ts +0 -31
- package/src/shared/views/CometChatCard/index.ts +0 -8
- package/src/shared/views/CometChatCard/style.ts +0 -13
- package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +0 -47
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +0 -174
- package/src/shared/views/CometChatCardBubble/index.tsx +0 -2
- package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +0 -43
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +0 -79
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +0 -36
- package/src/shared/views/CometChatDate/DateConfiguration.ts +0 -32
- package/src/shared/views/CometChatDate/DateStyle.ts +0 -26
- package/src/shared/views/CometChatDate/style.ts +0 -8
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +0 -206
- package/src/shared/views/CometChatDateTimePicker/DateTimePickerStyle.ts +0 -19
- package/src/shared/views/CometChatDateTimePicker/index.ts +0 -3
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +0 -127
- package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +0 -39
- package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
- package/src/shared/views/CometChatDropDown/resources/index.js +0 -5
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +0 -27
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +0 -44
- package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +0 -58
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +0 -542
- package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +0 -96
- package/src/shared/views/CometChatFormBubble/index.tsx +0 -2
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +0 -34
- package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +0 -27
- package/src/shared/views/CometChatLabel/LabelStyle.ts +0 -19
- package/src/shared/views/CometChatList/resources/Back.png +0 -0
- package/src/shared/views/CometChatList/resources/Search.png +0 -0
- package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +0 -21
- package/src/shared/views/CometChatListItem/ListItemStyle.ts +0 -47
- package/src/shared/views/CometChatMediaRecorder/MediaRecorderStyle.ts +0 -63
- package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +0 -26
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +0 -51
- package/src/shared/views/CometChatPanel/PanelStyle.tsx +0 -43
- package/src/shared/views/CometChatPanel/resources/CloseIcon.png +0 -0
- package/src/shared/views/CometChatPanel/resources/index.ts +0 -6
- package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +0 -13
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +0 -66
- package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +0 -55
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +0 -67
- package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +0 -38
- package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +0 -15
- package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +0 -13
- package/src/shared/views/CometChatReactions/ReactionsStyle.tsx +0 -43
- package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +0 -65
- package/src/shared/views/CometChatReceipt/ReceiptStyle.ts +0 -41
- package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +0 -1519
- package/src/shared/views/CometChatSchedulerBubble/index.ts +0 -3
- package/src/shared/views/CometChatSchedulerBubble/styles.ts +0 -92
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +0 -63
- package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +0 -35
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +0 -25
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorStyle.ts +0 -37
- package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +0 -23
- package/src/shared/views/CometChatTextBubble/TextBubbleStyle.ts +0 -37
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +0 -67
- package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +0 -26
- package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +0 -113
- package/src/shared/views/CometChatTimeSlotSelector/index.ts +0 -3
- package/src/shared/views/CometChatTimeSlotSelector/styles.ts +0 -30
- package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +0 -87
- package/src/shared/views/SwipeRow/SwipeRow.tsx +0 -126
- package/src/shared/views/SwipeRow/index.ts +0 -3
- package/src/shared/views/SwipeRow/style.ts +0 -30
- /package/src/{shared/assets/images → CometChatGroups/resources}/search.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/Back.png +0 -0
- /package/src/{AI/AIConversationSummary → CometChatThreadHeader}/resources/close.png +0 -0
- /package/src/{CometChatThreadedMessages → CometChatThreadHeader}/resources/more.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/password.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/private.png +0 -0
- /package/src/{CometChatDetails → CometChatThreadHeader}/resources/right-arrow.png +0 -0
|
@@ -1,135 +1,145 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
useContext,
|
|
3
|
-
useEffect,
|
|
4
|
-
useImperativeHandle,
|
|
5
|
-
useRef,
|
|
6
|
-
useState,
|
|
7
|
-
} from 'react';
|
|
8
|
-
|
|
1
|
+
import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
9
2
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
ActivityIndicator,
|
|
4
|
+
ColorValue,
|
|
12
5
|
FlatList,
|
|
13
|
-
|
|
6
|
+
GestureResponderEvent,
|
|
7
|
+
ImageSourcePropType,
|
|
8
|
+
ImageStyle,
|
|
14
9
|
StyleProp,
|
|
15
|
-
|
|
16
|
-
ListRenderItem,
|
|
17
|
-
ViewProps,
|
|
10
|
+
Text,
|
|
18
11
|
TextStyle,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from
|
|
22
|
-
import {
|
|
23
|
-
import { localize } from
|
|
12
|
+
View,
|
|
13
|
+
ViewStyle,
|
|
14
|
+
} from "react-native";
|
|
15
|
+
import { LOADING, NO_DATA_FOUND, SOMETHING_WRONG } from "../../constants/UIKitConstants";
|
|
16
|
+
import { localize } from "../../resources/CometChatLocalize";
|
|
17
|
+
|
|
18
|
+
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
19
|
+
import { useTheme } from "../../../theme";
|
|
20
|
+
import { CometChatTheme } from "../../../theme/type";
|
|
21
|
+
import { CometChatUIKit } from "../../CometChatUiKit";
|
|
22
|
+
import { DeepPartial } from "../../helper/types";
|
|
23
|
+
import { Icon } from "../../icons/Icon";
|
|
24
|
+
import { CometChatListItem } from "../CometChatListItem";
|
|
24
25
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
import { ICONS } from './resources';
|
|
31
|
-
import styles from './styles';
|
|
32
|
-
import { CometChatOptions } from '../../modals';
|
|
33
|
-
import { CometChatListItem } from '../../views/CometChatListItem';
|
|
34
|
-
import Header from './Header';
|
|
35
|
-
import { ImageType } from '../../base';
|
|
36
|
-
import { BorderStyleInterface, FontStyleInterface } from '../../base';
|
|
37
|
-
import { ListItemStyleInterface } from '../CometChatListItem/ListItemStyle';
|
|
38
|
-
import { AvatarStyleInterface } from '../CometChatAvatar/AvatarStyle';
|
|
39
|
-
import { CometChatContextType } from '../../base/Types';
|
|
40
|
-
//@ts-ignore
|
|
41
|
-
import { CometChat } from '@cometchat/chat-sdk-react-native';
|
|
42
|
-
import { StatusIndicatorStyleInterface } from '../CometChatStatusIndicator';
|
|
43
|
-
import { anyObject } from '../../utils';
|
|
26
|
+
CometChatStatusIndicatorInterface,
|
|
27
|
+
StatusIndicatorStyles,
|
|
28
|
+
} from "../CometChatStatusIndicator";
|
|
29
|
+
import Header from "./Header";
|
|
30
|
+
import styles from "./styles";
|
|
44
31
|
|
|
45
32
|
export interface CometChatListActionsInterface {
|
|
46
33
|
updateList: (prop: any) => void;
|
|
47
34
|
updateAndMoveToFirst: (item: any) => void;
|
|
48
35
|
addItemToList: (item: any, position?: number) => void;
|
|
49
36
|
removeItemFromList: (itemId: string | number) => void;
|
|
50
|
-
getListItem: (itemId: string | number) =>
|
|
37
|
+
getListItem: (itemId: string | number) => any;
|
|
51
38
|
getSelectedItems: () => Array<any>;
|
|
52
39
|
getAllListItems: () => Array<any>;
|
|
53
|
-
clearSelection: () => void;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const waitForList = {
|
|
57
|
-
resolve: (_: any[]) => null,
|
|
58
|
-
promise: () => {
|
|
59
|
-
return new Promise((resolve: (_: any[]) => void) => {
|
|
60
|
-
waitForList.resolve = resolve;
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
reset: () => {
|
|
64
|
-
waitForList.resolve = (_: any[]) => null;
|
|
65
|
-
}
|
|
66
40
|
}
|
|
67
41
|
|
|
68
42
|
export interface CometChatListStylesInterface {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
background?: string;
|
|
72
|
-
border?: BorderStyleInterface;
|
|
73
|
-
borderRadius?: number;
|
|
74
|
-
titleFont?: FontStyleInterface;
|
|
75
|
-
titleColor?: string;
|
|
76
|
-
backIconTint?: string;
|
|
77
|
-
searchBorder?: BorderStyleInterface;
|
|
78
|
-
searchBorderRadius?: number;
|
|
79
|
-
searchBackground?: string;
|
|
80
|
-
searchTextFont?: FontStyleInterface;
|
|
81
|
-
searchTextColor?: string;
|
|
82
|
-
searchIconTint?: string;
|
|
83
|
-
onlineStatusColor?: string;
|
|
43
|
+
containerStyle: ViewStyle;
|
|
44
|
+
onlineStatusColor?: ColorValue;
|
|
84
45
|
separatorColor?: string;
|
|
85
|
-
loadingIconTint?:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
46
|
+
loadingIconTint?: ColorValue;
|
|
47
|
+
sectionHeaderTextStyle?: TextStyle;
|
|
48
|
+
confirmSelectionStyle: {
|
|
49
|
+
icon?: ImageSourcePropType | JSX.Element;
|
|
50
|
+
iconStyle?: ImageStyle;
|
|
51
|
+
iconContainerStyle?: ImageStyle;
|
|
52
|
+
};
|
|
53
|
+
selectionCancelStyle: {
|
|
54
|
+
icon?: ImageSourcePropType | JSX.Element;
|
|
55
|
+
iconStyle?: ImageStyle;
|
|
56
|
+
iconContainerStyle?: ImageStyle;
|
|
57
|
+
};
|
|
58
|
+
titleSeparatorStyle: ViewStyle;
|
|
59
|
+
searchStyle?: {
|
|
60
|
+
textStyle: TextStyle;
|
|
61
|
+
placehodlerTextStyle?: TextStyle;
|
|
62
|
+
containerStyle: ViewStyle;
|
|
63
|
+
icon?: ImageSourcePropType | JSX.Element;
|
|
64
|
+
iconStyle: ImageStyle;
|
|
65
|
+
};
|
|
66
|
+
titleStyle: TextStyle;
|
|
67
|
+
titleViewStyle?: ViewStyle;
|
|
68
|
+
backButtonIcon?: ImageSourcePropType | JSX.Element;
|
|
69
|
+
backButtonIconStyle: ImageStyle;
|
|
70
|
+
itemStyle: {
|
|
71
|
+
avatarStyle: CometChatTheme["avatarStyle"];
|
|
72
|
+
containerStyle: ViewStyle;
|
|
73
|
+
titleStyle: TextStyle;
|
|
74
|
+
subtitleStyle: TextStyle;
|
|
75
|
+
statusIndicatorStyle?: Partial<StatusIndicatorStyles>;
|
|
76
|
+
headViewContainerStyle?: StyleProp<ViewStyle>;
|
|
77
|
+
titleSubtitleContainerStyle?: StyleProp<ViewStyle>;
|
|
78
|
+
trailingViewContainerStyle?: StyleProp<ViewStyle>;
|
|
79
|
+
};
|
|
80
|
+
emptyStateStyle: Partial<{
|
|
81
|
+
titleStyle: TextStyle;
|
|
82
|
+
subTitleStyle: TextStyle;
|
|
83
|
+
containerStyle: ViewStyle;
|
|
84
|
+
icon: ImageSourcePropType | JSX.Element;
|
|
85
|
+
iconStyle?: ImageStyle;
|
|
86
|
+
iconContainerStyle?: ViewStyle;
|
|
87
|
+
}>;
|
|
88
|
+
errorStateStyle: Partial<{
|
|
89
|
+
titleStyle: TextStyle;
|
|
90
|
+
subTitleStyle: TextStyle;
|
|
91
|
+
containerStyle: ViewStyle;
|
|
92
|
+
icon: ImageSourcePropType | JSX.Element;
|
|
93
|
+
iconStyle?: ImageStyle;
|
|
94
|
+
iconContainerStyle?: ViewStyle;
|
|
95
|
+
}>;
|
|
96
|
+
headerContainerStyle?: ViewStyle;
|
|
97
|
+
backButtonIconContainerStyle: ViewStyle;
|
|
92
98
|
}
|
|
99
|
+
|
|
93
100
|
export interface CometChatListProps {
|
|
94
|
-
|
|
95
|
-
|
|
101
|
+
ItemView?: (item: any) => JSX.Element;
|
|
102
|
+
LeadingView?: (item: any) => JSX.Element;
|
|
103
|
+
TitleView?: (item: any) => JSX.Element;
|
|
104
|
+
SubtitleView?: (item: any) => JSX.Element;
|
|
105
|
+
TrailingView?: (item: any) => JSX.Element;
|
|
96
106
|
disableUsersPresence?: boolean;
|
|
97
|
-
ListItemView?: (item: any) => JSX.Element | null;
|
|
98
107
|
AppBarOptions?: React.FC;
|
|
99
|
-
options?: (item: object | any) => Array<CometChatOptions>;
|
|
100
|
-
hideSeparator?: boolean;
|
|
101
108
|
searchPlaceholderText?: string;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
selectionMode?: 'none' | 'single' | 'multiple';
|
|
109
|
+
hideBackButton?: boolean;
|
|
110
|
+
selectionMode?: "none" | "single" | "multiple";
|
|
105
111
|
onSelection?: (list: any) => void;
|
|
106
|
-
|
|
112
|
+
onSubmit?: (list: any) => void;
|
|
107
113
|
hideSearch?: boolean;
|
|
114
|
+
hideHeader?: boolean;
|
|
108
115
|
title?: string;
|
|
109
|
-
|
|
116
|
+
EmptyView?: React.FC;
|
|
110
117
|
emptyStateText?: string;
|
|
111
118
|
errorStateText?: string;
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
ErrorView?: React.FC;
|
|
120
|
+
LoadingView?: React.FC;
|
|
114
121
|
requestBuilder?: any;
|
|
115
122
|
searchRequestBuilder?: any;
|
|
116
123
|
hideError?: boolean;
|
|
117
124
|
onItemPress?: (user: any) => void;
|
|
118
|
-
onItemLongPress?: (user: any) => void;
|
|
125
|
+
onItemLongPress?: (user: any, e: GestureResponderEvent) => void;
|
|
119
126
|
onError?: (error: CometChat.CometChatException) => void;
|
|
120
|
-
onBack?:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
onBack?: (() => void) | undefined;
|
|
128
|
+
listItemKey: "uid" | "guid" | "conversationId";
|
|
129
|
+
listStyle?: DeepPartial<CometChatListStylesInterface>;
|
|
130
|
+
hideSubmitButton?: boolean;
|
|
131
|
+
statusIndicatorType?: (item: any) => CometChatStatusIndicatorInterface["type"] | null;
|
|
132
|
+
hideStickyHeader?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Called once the list has been fetched or updated.
|
|
135
|
+
* Returns the final array of items currently in the list.
|
|
136
|
+
*/
|
|
137
|
+
onListFetched?: (fetchedList: any[]) => void;
|
|
131
138
|
}
|
|
132
139
|
|
|
140
|
+
let lastCall: any;
|
|
141
|
+
let lastReject: Function;
|
|
142
|
+
|
|
133
143
|
/**
|
|
134
144
|
* @class Users is a component useful for displaying the header and users in a list
|
|
135
145
|
* @description This component displays a header and list of users with subtitle,avatar,status
|
|
@@ -138,676 +148,636 @@ export interface CometChatListProps {
|
|
|
138
148
|
*
|
|
139
149
|
*/
|
|
140
150
|
|
|
141
|
-
export const CometChatList = React.forwardRef<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
getSelectedItems,
|
|
199
|
-
getAllListItems,
|
|
200
|
-
clearSelection,
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
const [searchInput, setSearchInput] = React.useState(
|
|
205
|
-
requestBuilder && searchRequestBuilder
|
|
206
|
-
? searchRequestBuilder.searchKeyword
|
|
207
|
-
? searchRequestBuilder.searchKeyword
|
|
208
|
-
: ''
|
|
209
|
-
: requestBuilder
|
|
210
|
-
? requestBuilder.searchKeyword
|
|
151
|
+
export const CometChatList = React.forwardRef<CometChatListActionsInterface, CometChatListProps>(
|
|
152
|
+
(props, ref) => {
|
|
153
|
+
const connectionListenerId = "connectionListener_" + new Date().getTime();
|
|
154
|
+
const theme = useTheme();
|
|
155
|
+
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
156
|
+
const [hasMoreData, setHasMoreData] = useState(true);
|
|
157
|
+
|
|
158
|
+
const {
|
|
159
|
+
LeadingView,
|
|
160
|
+
TitleView,
|
|
161
|
+
SubtitleView,
|
|
162
|
+
TrailingView,
|
|
163
|
+
disableUsersPresence = false,
|
|
164
|
+
ItemView,
|
|
165
|
+
AppBarOptions,
|
|
166
|
+
searchPlaceholderText,
|
|
167
|
+
hideBackButton,
|
|
168
|
+
selectionMode = "none",
|
|
169
|
+
onSelection = () => {},
|
|
170
|
+
onSubmit,
|
|
171
|
+
hideSearch = false,
|
|
172
|
+
title = "Title",
|
|
173
|
+
EmptyView,
|
|
174
|
+
emptyStateText = localize("NO_USERS_FOUND"),
|
|
175
|
+
errorStateText = localize("SOMETHING_WRONG"),
|
|
176
|
+
ErrorView,
|
|
177
|
+
LoadingView,
|
|
178
|
+
requestBuilder,
|
|
179
|
+
hideHeader,
|
|
180
|
+
searchRequestBuilder = undefined,
|
|
181
|
+
hideError = false,
|
|
182
|
+
onItemPress = () => {},
|
|
183
|
+
onItemLongPress = () => {},
|
|
184
|
+
onError,
|
|
185
|
+
onBack,
|
|
186
|
+
listItemKey = "uid",
|
|
187
|
+
listStyle,
|
|
188
|
+
hideSubmitButton,
|
|
189
|
+
statusIndicatorType,
|
|
190
|
+
hideStickyHeader = false,
|
|
191
|
+
} = props;
|
|
192
|
+
|
|
193
|
+
// functions which can be accessed by parents
|
|
194
|
+
useImperativeHandle(ref, () => {
|
|
195
|
+
return {
|
|
196
|
+
updateList,
|
|
197
|
+
addItemToList,
|
|
198
|
+
removeItemFromList,
|
|
199
|
+
getListItem,
|
|
200
|
+
updateAndMoveToFirst,
|
|
201
|
+
getSelectedItems,
|
|
202
|
+
getAllListItems,
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
const [searchInput, setSearchInput] = useState(
|
|
207
|
+
requestBuilder
|
|
211
208
|
? requestBuilder.searchKeyword
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
: ''
|
|
224
|
-
: requestBuilder
|
|
225
|
-
? requestBuilder.searchKeyword
|
|
209
|
+
? requestBuilder.searchKeyword
|
|
210
|
+
: ""
|
|
211
|
+
: searchRequestBuilder
|
|
212
|
+
? searchRequestBuilder.searchKeyword
|
|
213
|
+
? searchRequestBuilder.searchKeyword
|
|
214
|
+
: ""
|
|
215
|
+
: ""
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const searchInputRef = useRef(
|
|
219
|
+
requestBuilder
|
|
226
220
|
? requestBuilder.searchKeyword
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const [shouldSelect, setShouldSelect] = React.useState(
|
|
236
|
-
selectionMode !== 'none' ? true : false
|
|
237
|
-
);
|
|
238
|
-
const [selectedItems, setSelectedItems] = useState<anyObject>({});
|
|
239
|
-
const listHandlerRef = React.useRef(null);
|
|
240
|
-
const initialRunRef = React.useRef(true);
|
|
241
|
-
|
|
242
|
-
const activeSwipeRows = React.useRef<anyObject>({});
|
|
243
|
-
|
|
244
|
-
const [list, setList] = React.useState<any[]>([]);
|
|
245
|
-
const [decoratorMessage, setDecoratorMessage] = React.useState(LOADING);
|
|
246
|
-
|
|
247
|
-
if (list.length > 0) {
|
|
248
|
-
waitForList.resolve(list);
|
|
249
|
-
waitForList.reset();
|
|
250
|
-
}
|
|
221
|
+
? requestBuilder.searchKeyword
|
|
222
|
+
: ""
|
|
223
|
+
: searchRequestBuilder
|
|
224
|
+
? searchRequestBuilder.searchKeyword
|
|
225
|
+
? searchRequestBuilder.searchKeyword
|
|
226
|
+
: ""
|
|
227
|
+
: ""
|
|
228
|
+
);
|
|
251
229
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
_searchRequestBuilder = searchRequestBuilder
|
|
257
|
-
.setSearchKeyword(searchText ? searchText : '')
|
|
258
|
-
.build();
|
|
259
|
-
} else if (requestBuilder) {
|
|
260
|
-
_searchRequestBuilder = requestBuilder
|
|
261
|
-
.setSearchKeyword(searchText ? searchText : '')
|
|
262
|
-
.build();
|
|
263
|
-
}
|
|
264
|
-
getSearch(_searchRequestBuilder);
|
|
265
|
-
};
|
|
230
|
+
const [selectedItems, setSelectedItems] = useState<{ [key: string]: any }>({});
|
|
231
|
+
const [shouldSelect, setShouldSelect] = useState(
|
|
232
|
+
props.selectionMode === "single" || props.selectionMode === "multiple"
|
|
233
|
+
);
|
|
266
234
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
.then((newlist: any) => {
|
|
270
|
-
setDecoratorMessage(NO_DATA_FOUND);
|
|
271
|
-
setList(newlist);
|
|
272
|
-
})
|
|
273
|
-
.catch((error) => {
|
|
274
|
-
if (error && error['message'] == 'Promise cancelled') {
|
|
275
|
-
} else {
|
|
276
|
-
setDecoratorMessage(SOMETHING_WRONG);
|
|
277
|
-
errorHandler(error);
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
};
|
|
235
|
+
const listHandlerRef = useRef<any>(null);
|
|
236
|
+
const initialRunRef = useRef(true);
|
|
281
237
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
Object.keys(selectedItems).forEach((item) => {
|
|
285
|
-
return markedItems.push(getListItem(item));
|
|
286
|
-
});
|
|
287
|
-
return markedItems;
|
|
288
|
-
};
|
|
238
|
+
const [list, setList] = useState<any[]>([]);
|
|
239
|
+
const [dataLoadingStatus, setDataLoadingStatus] = useState<string>(LOADING);
|
|
289
240
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
onConnected: () => {
|
|
295
|
-
console.log('ConnectionListener => On Connected');
|
|
296
|
-
if (requestBuilder) {
|
|
297
|
-
if (searchInputRef.current)
|
|
298
|
-
listHandlerRef.current = requestBuilder
|
|
299
|
-
.setSearchKeyword(searchInputRef.current)
|
|
300
|
-
.build();
|
|
301
|
-
else listHandlerRef.current = requestBuilder.build();
|
|
302
|
-
}
|
|
303
|
-
getList(listHandlerRef.current)
|
|
304
|
-
.then((newlist: any) => {
|
|
305
|
-
setDecoratorMessage(NO_DATA_FOUND);
|
|
306
|
-
setList(newlist);
|
|
307
|
-
})
|
|
308
|
-
.catch((error) => {
|
|
309
|
-
if (error && error['message'] == 'Promise cancelled') {
|
|
310
|
-
} else {
|
|
311
|
-
setDecoratorMessage(SOMETHING_WRONG);
|
|
312
|
-
errorHandler(error);
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
},
|
|
316
|
-
inConnecting: () => {
|
|
317
|
-
console.log('ConnectionListener => In connecting');
|
|
318
|
-
},
|
|
319
|
-
onDisconnected: () => {
|
|
320
|
-
console.log('ConnectionListener => On Disconnected');
|
|
321
|
-
},
|
|
322
|
-
})
|
|
323
|
-
);
|
|
324
|
-
return () => {
|
|
325
|
-
CometChat.removeConnectionListener(connectionListenerId);
|
|
326
|
-
};
|
|
327
|
-
}, []);
|
|
328
|
-
|
|
329
|
-
useEffect(() => {
|
|
330
|
-
if (initialRunRef.current === true) {
|
|
331
|
-
if (requestBuilder) {
|
|
332
|
-
if (searchInput)
|
|
333
|
-
listHandlerRef.current = requestBuilder
|
|
334
|
-
.setSearchKeyword(searchInput)
|
|
335
|
-
.build();
|
|
336
|
-
else listHandlerRef.current = requestBuilder.build();
|
|
241
|
+
useEffect(() => {
|
|
242
|
+
if (props.onSelection) {
|
|
243
|
+
const selectedArray = Object.values(selectedItems);
|
|
244
|
+
props.onSelection(selectedArray);
|
|
337
245
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
246
|
+
}, [selectedItems]);
|
|
247
|
+
|
|
248
|
+
// Debounced search handler
|
|
249
|
+
const searchHandler = (searchText: string) => {
|
|
250
|
+
setSearchInput(searchText);
|
|
251
|
+
setHasMoreData(true);
|
|
252
|
+
let _searchRequestBuilder = searchRequestBuilder || requestBuilder;
|
|
253
|
+
if (searchRequestBuilder && searchText) {
|
|
254
|
+
_searchRequestBuilder = searchRequestBuilder.setSearchKeyword(searchText).build();
|
|
255
|
+
} else if (requestBuilder) {
|
|
256
|
+
_searchRequestBuilder = requestBuilder.setSearchKeyword(searchText).build();
|
|
257
|
+
}
|
|
258
|
+
getSearch(_searchRequestBuilder);
|
|
259
|
+
};
|
|
350
260
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
261
|
+
const getSearch = (builder: any) => {
|
|
262
|
+
getList(builder)
|
|
263
|
+
.then((newlist: any) => {
|
|
264
|
+
setDataLoadingStatus(NO_DATA_FOUND);
|
|
265
|
+
setList(newlist);
|
|
266
|
+
})
|
|
267
|
+
.catch((error) => {
|
|
268
|
+
if (error && error["message"] == "Promise cancelled") {
|
|
269
|
+
// Handle promise cancellation if necessary
|
|
270
|
+
} else {
|
|
271
|
+
setDataLoadingStatus(SOMETHING_WRONG);
|
|
272
|
+
errorHandler(error);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
};
|
|
366
276
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
thisList = await waitForList.promise();
|
|
277
|
+
const getSelectedItems = () => {
|
|
278
|
+
let markedItems: any[] = [];
|
|
279
|
+
Object.keys(selectedItems).forEach((item) => {
|
|
280
|
+
const listItem = getListItem(item);
|
|
281
|
+
if (listItem) markedItems.push(listItem);
|
|
282
|
+
});
|
|
283
|
+
return markedItems;
|
|
375
284
|
};
|
|
376
|
-
let newList = [...thisList];
|
|
377
|
-
let itemKey = newList.findIndex(
|
|
378
|
-
(u) => u[listItemKey] === item[listItemKey]
|
|
379
|
-
);
|
|
380
|
-
if (itemKey > -1) {
|
|
381
|
-
newList.splice(itemKey, 1);
|
|
382
|
-
}
|
|
383
|
-
setList([item, ...newList]);
|
|
384
|
-
};
|
|
385
285
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
286
|
+
useEffect(() => {
|
|
287
|
+
CometChat.addConnectionListener(
|
|
288
|
+
connectionListenerId,
|
|
289
|
+
new CometChat.ConnectionListener({
|
|
290
|
+
onConnected: () => {
|
|
291
|
+
if (requestBuilder) {
|
|
292
|
+
if (searchInputRef.current)
|
|
293
|
+
listHandlerRef.current = requestBuilder
|
|
294
|
+
.setSearchKeyword(searchInputRef.current)
|
|
295
|
+
.build();
|
|
296
|
+
else listHandlerRef.current = requestBuilder.build();
|
|
297
|
+
}
|
|
298
|
+
getList(listHandlerRef.current)
|
|
299
|
+
.then((newlist: any[]) => {
|
|
300
|
+
setDataLoadingStatus(NO_DATA_FOUND);
|
|
301
|
+
setList(newlist);
|
|
302
|
+
})
|
|
303
|
+
.catch((error) => {
|
|
304
|
+
if (error && error["message"] === "Promise cancelled") {
|
|
305
|
+
// Handle promise cancellation if necessary
|
|
306
|
+
} else {
|
|
307
|
+
setDataLoadingStatus(SOMETHING_WRONG);
|
|
308
|
+
errorHandler(error);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
inConnecting: () => {
|
|
313
|
+
console.log("ConnectionListener => In connecting");
|
|
314
|
+
},
|
|
315
|
+
onDisconnected: () => {
|
|
316
|
+
console.log("ConnectionListener => On Disconnected");
|
|
317
|
+
},
|
|
318
|
+
})
|
|
319
|
+
);
|
|
320
|
+
return () => {
|
|
321
|
+
CometChat.removeConnectionListener(connectionListenerId);
|
|
322
|
+
};
|
|
323
|
+
}, []);
|
|
324
|
+
|
|
325
|
+
useEffect(() => {
|
|
326
|
+
if (initialRunRef.current === true) {
|
|
327
|
+
if (requestBuilder) {
|
|
328
|
+
if (searchInput)
|
|
329
|
+
listHandlerRef.current = requestBuilder.setSearchKeyword(searchInput).build();
|
|
330
|
+
else listHandlerRef.current = requestBuilder.build();
|
|
331
|
+
}
|
|
332
|
+
initialRunRef.current = false;
|
|
333
|
+
handleList(false);
|
|
393
334
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
335
|
+
}, []);
|
|
336
|
+
|
|
337
|
+
useEffect(() => {
|
|
338
|
+
searchInputRef.current = searchInput;
|
|
339
|
+
}, [searchInput]);
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Updates the list of users to be displayed
|
|
343
|
+
* @param
|
|
344
|
+
*/
|
|
345
|
+
const updateList = (item: any) => {
|
|
346
|
+
let newList = [...list];
|
|
347
|
+
let itemKey = newList.findIndex((u) => u[listItemKey] === item[listItemKey]);
|
|
348
|
+
if (itemKey > -1) {
|
|
349
|
+
newList.splice(itemKey, 1, item);
|
|
350
|
+
if (newList.length === 0) setDataLoadingStatus(NO_DATA_FOUND);
|
|
351
|
+
setList(newList);
|
|
409
352
|
}
|
|
410
|
-
}
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
const getListItem = (itemId: string | number): any => {
|
|
414
|
-
return list.find((item: any) => item[listItemKey] == itemId);
|
|
415
|
-
};
|
|
353
|
+
};
|
|
416
354
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
355
|
+
/**
|
|
356
|
+
* This will move item to first location if item doesn't exist then add it to first location.
|
|
357
|
+
* @param item
|
|
358
|
+
*/
|
|
359
|
+
const updateAndMoveToFirst = (item: any) => {
|
|
360
|
+
let newList = [...list];
|
|
361
|
+
let itemKey = newList.findIndex((u) => u[listItemKey] === item[listItemKey]);
|
|
362
|
+
if (itemKey > -1) {
|
|
363
|
+
newList.splice(itemKey, 1);
|
|
364
|
+
}
|
|
365
|
+
setList([item, ...newList]);
|
|
366
|
+
};
|
|
423
367
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
.then((newlist: any) => {
|
|
431
|
-
if ((thrughKeyword || list.length === 0) && newlist.length === 0) {
|
|
432
|
-
setDecoratorMessage(NO_DATA_FOUND);
|
|
433
|
-
} else {
|
|
434
|
-
setDecoratorMessage('');
|
|
435
|
-
}
|
|
436
|
-
if (thrughKeyword && thrughKeyword === true) {
|
|
437
|
-
setList(newlist);
|
|
438
|
-
} else {
|
|
439
|
-
setList([].concat(list, newlist));
|
|
440
|
-
}
|
|
441
|
-
})
|
|
442
|
-
.catch((error) => {
|
|
443
|
-
if (error && error['message'] == 'Promise cancelled') {
|
|
444
|
-
} else {
|
|
445
|
-
setDecoratorMessage(SOMETHING_WRONG);
|
|
446
|
-
errorHandler(error);
|
|
368
|
+
const addItemToList = (item: any, position?: number) => {
|
|
369
|
+
setList((prev: any[]) => {
|
|
370
|
+
if (position !== undefined) {
|
|
371
|
+
if (position === 0) return [item, ...prev];
|
|
372
|
+
if (position >= prev.length) return [...prev, item];
|
|
373
|
+
else return [...prev.slice(0, position - 1), item, ...prev.slice(position)];
|
|
447
374
|
}
|
|
375
|
+
return [...prev, item];
|
|
448
376
|
});
|
|
449
|
-
|
|
377
|
+
};
|
|
450
378
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
379
|
+
const removeItemFromList = (uid: string | number) => {
|
|
380
|
+
setList((prev: any[]) => {
|
|
381
|
+
let newList = prev.filter((item: any) => item[listItemKey] !== uid);
|
|
382
|
+
if (newList.length === 0) setDataLoadingStatus(NO_DATA_FOUND);
|
|
383
|
+
return newList;
|
|
384
|
+
});
|
|
385
|
+
if (ItemView === undefined && shouldSelect) {
|
|
386
|
+
let newSelectedItems = { ...selectedItems };
|
|
387
|
+
if (Object.keys(selectedItems).includes(uid.toString())) {
|
|
388
|
+
delete newSelectedItems[uid];
|
|
389
|
+
setSelectedItems(newSelectedItems);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
};
|
|
457
393
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
};
|
|
394
|
+
const getListItem = (itemId: string | number): any => {
|
|
395
|
+
return list.find((item: any) => item[listItemKey] === itemId);
|
|
396
|
+
};
|
|
462
397
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
if (Object.keys(prev).includes(listItem.value[listItemKey])) {
|
|
470
|
-
delete newState[listItem.value[listItemKey]];
|
|
471
|
-
return newState;
|
|
472
|
-
} else {
|
|
473
|
-
newState[listItem.value[listItemKey]] = listItem.value;
|
|
474
|
-
return newState;
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
else if (selectionMode === 'single')
|
|
478
|
-
setSelectedItems({ [listItem.value[listItemKey]]: listItem.value });
|
|
479
|
-
};
|
|
398
|
+
/**
|
|
399
|
+
* Get all list items
|
|
400
|
+
*/
|
|
401
|
+
const getAllListItems = (): any[] => {
|
|
402
|
+
return list;
|
|
403
|
+
};
|
|
480
404
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
405
|
+
/**
|
|
406
|
+
* Handle list fetching with pagination
|
|
407
|
+
* @param {boolean} throughKeyword - Pass true if wants to set only new users.
|
|
408
|
+
*/
|
|
409
|
+
const handleList = (throughKeyword?: boolean) => {
|
|
410
|
+
// Prevent multiple fetches
|
|
411
|
+
if (isLoadingMore || (!throughKeyword && !hasMoreData)) return;
|
|
412
|
+
setIsLoadingMore(true);
|
|
413
|
+
|
|
414
|
+
getList(listHandlerRef.current)
|
|
415
|
+
.then((newlist: any[] = []) => {
|
|
416
|
+
let finalList: any[] = [];
|
|
417
|
+
|
|
418
|
+
if (throughKeyword || list.length === 0) {
|
|
419
|
+
// If we're resetting the list or there is no existing list
|
|
420
|
+
if (throughKeyword) setHasMoreData(true);
|
|
421
|
+
else if (newlist.length === 0) setHasMoreData(false);
|
|
422
|
+
|
|
423
|
+
finalList = newlist;
|
|
424
|
+
if (finalList.length === 0) {
|
|
425
|
+
setDataLoadingStatus(NO_DATA_FOUND);
|
|
426
|
+
} else {
|
|
427
|
+
setDataLoadingStatus("");
|
|
428
|
+
}
|
|
429
|
+
setList(finalList);
|
|
430
|
+
} else {
|
|
431
|
+
// Append to existing list
|
|
432
|
+
finalList = [...list, ...newlist];
|
|
433
|
+
setList(finalList);
|
|
489
434
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
};
|
|
435
|
+
// When the backend returns nothing more, mark the end of data
|
|
436
|
+
if (newlist.length === 0) setHasMoreData(false);
|
|
437
|
+
}
|
|
494
438
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
439
|
+
// If we *did* get results but less than a full “page”, also stop further loads
|
|
440
|
+
if (newlist.length === 0) setHasMoreData(false);
|
|
441
|
+
|
|
442
|
+
props.onListFetched?.(finalList);
|
|
443
|
+
setIsLoadingMore(false);
|
|
444
|
+
})
|
|
445
|
+
.catch((error) => {
|
|
446
|
+
if (error && error["message"] === "Promise cancelled") {
|
|
447
|
+
// Handle promise cancellation if necessary
|
|
503
448
|
} else {
|
|
504
|
-
|
|
505
|
-
|
|
449
|
+
setDataLoadingStatus(SOMETHING_WRONG);
|
|
450
|
+
errorHandler(error);
|
|
506
451
|
}
|
|
452
|
+
setIsLoadingMore(false);
|
|
507
453
|
});
|
|
508
|
-
|
|
509
|
-
setSelectedItems({ [item.value[listItemKey]]: item.value });
|
|
510
|
-
}
|
|
511
|
-
onItemPress && onItemPress(item.value);
|
|
512
|
-
// CometChatUserEvents.emit(CometChatUserEvents.onUserItemClick, item);
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
const onListItemLongPress = (item: any) => {
|
|
516
|
-
handleSelection(item);
|
|
517
|
-
onItemLongPress && onItemLongPress(item.value);
|
|
518
|
-
// CometChatUserEvents.emit(CometChatUserEvents.onUserItemClick, item);
|
|
519
|
-
};
|
|
454
|
+
};
|
|
520
455
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
const headerLetter = item.value;
|
|
456
|
+
const renderFooter = useCallback(() => {
|
|
457
|
+
if (!isLoadingMore || !hasMoreData) return null;
|
|
524
458
|
return (
|
|
525
|
-
<View
|
|
526
|
-
<
|
|
527
|
-
style={[
|
|
528
|
-
styles.dividerStyle,
|
|
529
|
-
{
|
|
530
|
-
backgroundColor:
|
|
531
|
-
listStyle?.separatorColor ?? theme.palette.getAccent100(),
|
|
532
|
-
},
|
|
533
|
-
]}
|
|
534
|
-
></View>
|
|
535
|
-
<Text
|
|
536
|
-
style={
|
|
537
|
-
[
|
|
538
|
-
styles.headerLetterStyle,
|
|
539
|
-
{
|
|
540
|
-
color:
|
|
541
|
-
listStyle?.sectionHeaderTextColor ??
|
|
542
|
-
theme.palette.getAccent500(),
|
|
543
|
-
},
|
|
544
|
-
listStyle?.sectionHeaderTextFont ?? theme.typography.text2,
|
|
545
|
-
] as TextStyle[]
|
|
546
|
-
}
|
|
547
|
-
>
|
|
548
|
-
{headerLetter}
|
|
549
|
-
</Text>
|
|
459
|
+
<View style={styles.footerContainer}>
|
|
460
|
+
<ActivityIndicator size='small' color={theme.color.primary} />
|
|
550
461
|
</View>
|
|
551
462
|
);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
: ''
|
|
579
|
-
}
|
|
580
|
-
statusIndicatorIcon={
|
|
581
|
-
Object.keys(selectedItems).includes(item.value[listItemKey]) &&
|
|
582
|
-
ICONS.CHECK
|
|
583
|
-
}
|
|
584
|
-
{...(SubtitleView
|
|
585
|
-
? { SubtitleView: () => SubtitleView(item.value) }
|
|
586
|
-
: {})}
|
|
587
|
-
{...(TailView ? { TailView: () => TailView(item.value) } : {})}
|
|
588
|
-
statusIndicatorStyle={
|
|
589
|
-
selectedItems[item.value[listItemKey]] === true
|
|
590
|
-
? {
|
|
591
|
-
...(statusIndicatorStyle as object),
|
|
592
|
-
borderRadius: 10,
|
|
593
|
-
height: 20,
|
|
594
|
-
width: 20,
|
|
595
|
-
}
|
|
596
|
-
: (statusIndicatorStyle as ViewProps)
|
|
597
|
-
}
|
|
598
|
-
avatarStyle={avatarStyle}
|
|
599
|
-
options={() => (options ? options(item.value) : [])}
|
|
600
|
-
activeSwipeRows={activeSwipeRows.current}
|
|
601
|
-
rowOpens={(id) => {
|
|
602
|
-
Object.keys(activeSwipeRows.current).forEach((key) => {
|
|
603
|
-
if (id !== key && activeSwipeRows.current[key]) {
|
|
604
|
-
activeSwipeRows.current[key]?.current?.closeRow?.();
|
|
605
|
-
delete activeSwipeRows.current[key];
|
|
463
|
+
}, [isLoadingMore, hasMoreData]);
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Handle errors
|
|
467
|
+
*/
|
|
468
|
+
const errorHandler = (errorCode: any) => {
|
|
469
|
+
onError && onError(errorCode);
|
|
470
|
+
// CometChatUserEvents.emit(CometChatUserEvents.onUserError, errorCode);
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Handle item selection based on selection mode
|
|
475
|
+
*/
|
|
476
|
+
const handleSelection = useCallback(
|
|
477
|
+
(listItem: any) => {
|
|
478
|
+
if (selectionMode === "none") return;
|
|
479
|
+
|
|
480
|
+
const itemKey = listItem.value[listItemKey];
|
|
481
|
+
|
|
482
|
+
setSelectedItems((prev: any) => {
|
|
483
|
+
let newState = { ...prev };
|
|
484
|
+
if (selectionMode === "multiple") {
|
|
485
|
+
if (newState[itemKey]) {
|
|
486
|
+
delete newState[itemKey];
|
|
487
|
+
} else {
|
|
488
|
+
newState[itemKey] = listItem.value;
|
|
606
489
|
}
|
|
607
|
-
})
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
490
|
+
} else if (selectionMode === "single") {
|
|
491
|
+
if (newState[itemKey]) {
|
|
492
|
+
delete newState[itemKey];
|
|
493
|
+
} else {
|
|
494
|
+
newState = { [itemKey]: listItem.value };
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
// Notify parent about selection change
|
|
498
|
+
|
|
499
|
+
return newState;
|
|
500
|
+
});
|
|
501
|
+
},
|
|
502
|
+
[selectionMode, onSelection, listItemKey]
|
|
616
503
|
);
|
|
617
|
-
};
|
|
618
504
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
505
|
+
/**
|
|
506
|
+
* Handle Cancel action
|
|
507
|
+
*/
|
|
508
|
+
const handleCancelSelection = () => {
|
|
509
|
+
setSelectedItems({});
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Handle Confirm action
|
|
514
|
+
*/
|
|
515
|
+
const handleConfirmSelection = () => {
|
|
516
|
+
onSubmit && onSubmit(Object.values(selectedItems));
|
|
517
|
+
// Optionally, you might want to clear the selection after confirmation
|
|
518
|
+
setSelectedItems({});
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
const onListItemPress = (item: any) => {
|
|
522
|
+
if (shouldSelect) {
|
|
523
|
+
handleSelection(item);
|
|
524
|
+
} else {
|
|
525
|
+
onItemPress(item.value);
|
|
630
526
|
}
|
|
527
|
+
};
|
|
631
528
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
resolve(listItems);
|
|
637
|
-
})
|
|
638
|
-
.catch((error: any) => {
|
|
639
|
-
reject(error);
|
|
640
|
-
});
|
|
641
|
-
}, 500);
|
|
642
|
-
lastReject.current = reject;
|
|
643
|
-
});
|
|
644
|
-
return promise;
|
|
645
|
-
};
|
|
529
|
+
const onListItemLongPress = (item: any, e: GestureResponderEvent) => {
|
|
530
|
+
handleSelection(item);
|
|
531
|
+
onItemLongPress(item.value, e);
|
|
532
|
+
};
|
|
646
533
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
listStyle?.emptyTextColor ?? theme.palette.getAccent400(),
|
|
679
|
-
},
|
|
680
|
-
] as TextStyle[]
|
|
534
|
+
const selectedCount = Object.keys(selectedItems).length;
|
|
535
|
+
|
|
536
|
+
const renderItemView = useCallback(
|
|
537
|
+
({ item, index }: any) => {
|
|
538
|
+
if (item.header) {
|
|
539
|
+
if (hideStickyHeader) return null;
|
|
540
|
+
const headerLetter = item.value;
|
|
541
|
+
|
|
542
|
+
return (
|
|
543
|
+
<View key={`header_${headerLetter}_${index}`}>
|
|
544
|
+
<Text style={[styles.headerLetterStyle, listStyle?.sectionHeaderTextStyle]}>
|
|
545
|
+
{headerLetter}
|
|
546
|
+
</Text>
|
|
547
|
+
</View>
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
return (
|
|
551
|
+
<CometChatListItem
|
|
552
|
+
statusIndicatorType={statusIndicatorType ? statusIndicatorType(item.value) : null}
|
|
553
|
+
id={item.value[listItemKey]}
|
|
554
|
+
avatarName={item.value.name}
|
|
555
|
+
selected={!!selectedItems[item.value[listItemKey]]}
|
|
556
|
+
shouldSelect={shouldSelect}
|
|
557
|
+
LeadingView={LeadingView && LeadingView(item.value)}
|
|
558
|
+
TitleView={TitleView && TitleView(item.value)}
|
|
559
|
+
title={
|
|
560
|
+
item.value.uid &&
|
|
561
|
+
item.value.uid === CometChatUIKit.loggedInUser!.getUid() &&
|
|
562
|
+
item.value.name === CometChatUIKit.loggedInUser!.getName()
|
|
563
|
+
? localize("YOU")
|
|
564
|
+
: item.value.name
|
|
681
565
|
}
|
|
682
|
-
|
|
683
|
-
{
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
} else if (
|
|
688
|
-
!hideError &&
|
|
689
|
-
decoratorMessage.toLowerCase() === SOMETHING_WRONG
|
|
690
|
-
) {
|
|
691
|
-
messageContainer = ErrorStateView ? (
|
|
692
|
-
<ErrorStateView />
|
|
693
|
-
) : (
|
|
694
|
-
<View style={styles.msgContainerStyle}>
|
|
695
|
-
<Text
|
|
696
|
-
style={
|
|
697
|
-
[
|
|
698
|
-
styles.msgTxtStyle,
|
|
699
|
-
listStyle?.errorTextFont ?? theme.typography.body,
|
|
700
|
-
{
|
|
701
|
-
color:
|
|
702
|
-
listStyle?.errorTextColor ?? theme.palette.getAccent400(),
|
|
703
|
-
},
|
|
704
|
-
] as TextStyle[]
|
|
566
|
+
containerStyle={[listStyle?.itemStyle?.containerStyle]}
|
|
567
|
+
titleStyle={listStyle?.itemStyle?.titleStyle}
|
|
568
|
+
headViewContainerStyle={
|
|
569
|
+
(listStyle?.itemStyle?.headViewContainerStyle as StyleProp<ViewStyle>) ??
|
|
570
|
+
({ marginHorizontal: 9 } as StyleProp<ViewStyle>)
|
|
705
571
|
}
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
572
|
+
titleSubtitleContainerStyle={
|
|
573
|
+
(listStyle?.itemStyle?.titleSubtitleContainerStyle as StyleProp<ViewStyle>) ??
|
|
574
|
+
({} as StyleProp<ViewStyle>)
|
|
575
|
+
}
|
|
576
|
+
trailingViewContainerStyle={
|
|
577
|
+
(listStyle?.itemStyle?.trailingViewContainerStyle as StyleProp<ViewStyle>) ??
|
|
578
|
+
({} as StyleProp<ViewStyle>)
|
|
579
|
+
}
|
|
580
|
+
avatarURL={item.value.avatar || undefined}
|
|
581
|
+
avatarStyle={listStyle?.itemStyle?.avatarStyle}
|
|
582
|
+
SubtitleView={SubtitleView ? SubtitleView(item.value) : undefined}
|
|
583
|
+
TrailingView={TrailingView ? TrailingView(item.value) : undefined}
|
|
584
|
+
onPress={() => {
|
|
585
|
+
onListItemPress(item);
|
|
586
|
+
}}
|
|
587
|
+
// onLongPress={() => {
|
|
588
|
+
// onListItemLongPress(item);
|
|
589
|
+
// }}
|
|
590
|
+
onLongPress={(id: any, e: any) => {
|
|
591
|
+
// const listItem = getListItem(id);
|
|
592
|
+
onListItemLongPress(item, e);
|
|
593
|
+
}}
|
|
594
|
+
/>
|
|
595
|
+
);
|
|
596
|
+
},
|
|
597
|
+
[
|
|
598
|
+
listItemKey,
|
|
599
|
+
selectedItems,
|
|
600
|
+
shouldSelect,
|
|
601
|
+
listStyle,
|
|
602
|
+
SubtitleView,
|
|
603
|
+
TitleView,
|
|
604
|
+
TrailingView,
|
|
605
|
+
disableUsersPresence,
|
|
606
|
+
theme,
|
|
607
|
+
onListItemPress,
|
|
608
|
+
onListItemLongPress,
|
|
609
|
+
hideStickyHeader,
|
|
610
|
+
LeadingView,
|
|
611
|
+
]
|
|
612
|
+
);
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Gets the list of users
|
|
616
|
+
*/
|
|
617
|
+
const getList = (reqBuilder: any): Promise<any[]> => {
|
|
618
|
+
const promise = new Promise<any[]>((resolve, reject) => {
|
|
619
|
+
const cancel = () => {
|
|
620
|
+
clearTimeout(lastCall);
|
|
621
|
+
lastReject(new Error("Promise cancelled"));
|
|
622
|
+
};
|
|
623
|
+
if (lastCall) {
|
|
624
|
+
cancel();
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
lastCall = setTimeout(() => {
|
|
628
|
+
reqBuilder
|
|
629
|
+
?.fetchNext()
|
|
630
|
+
.then((listItems: any) => {
|
|
631
|
+
resolve(listItems);
|
|
632
|
+
})
|
|
633
|
+
.catch((error: CometChat.CometChatException) => {
|
|
634
|
+
reject(error);
|
|
722
635
|
});
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
636
|
+
}, 500);
|
|
637
|
+
lastReject = reject;
|
|
638
|
+
});
|
|
639
|
+
return promise;
|
|
640
|
+
};
|
|
726
641
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
642
|
+
/**
|
|
643
|
+
* Returns a container of users if exists else returns the corresponding decorator message
|
|
644
|
+
*/
|
|
645
|
+
const getMessageContainer = useCallback(() => {
|
|
646
|
+
let messageContainer = null;
|
|
647
|
+
if (list.length === 0 && dataLoadingStatus.toLowerCase() === NO_DATA_FOUND) {
|
|
648
|
+
messageContainer = EmptyView ? (
|
|
649
|
+
<EmptyView />
|
|
650
|
+
) : (
|
|
651
|
+
<View style={[styles.msgContainerStyle, listStyle?.emptyStateStyle?.containerStyle]}>
|
|
652
|
+
<Text style={[styles.msgTxtStyle, listStyle?.emptyStateStyle?.titleStyle]}>
|
|
653
|
+
{emptyStateText}
|
|
654
|
+
</Text>
|
|
655
|
+
</View>
|
|
656
|
+
);
|
|
657
|
+
} else if (!hideError && dataLoadingStatus.toLowerCase() === SOMETHING_WRONG) {
|
|
658
|
+
messageContainer = ErrorView ? (
|
|
659
|
+
<ErrorView />
|
|
660
|
+
) : (
|
|
661
|
+
<View style={[styles.msgContainerStyle, listStyle?.errorStateStyle?.containerStyle]}>
|
|
662
|
+
{listStyle?.errorStateStyle?.icon && (
|
|
663
|
+
<Icon name='error' size={24} color={theme.color.error} />
|
|
664
|
+
)}
|
|
665
|
+
<Text style={[styles.msgTxtStyle, listStyle?.errorStateStyle?.titleStyle]}>
|
|
666
|
+
{errorStateText}
|
|
667
|
+
</Text>
|
|
752
668
|
</View>
|
|
753
669
|
);
|
|
670
|
+
} else {
|
|
671
|
+
let currentLetter = "";
|
|
672
|
+
const listWithHeaders: any[] = [];
|
|
673
|
+
if (list.length) {
|
|
674
|
+
list.forEach((listItem: any) => {
|
|
675
|
+
const chr = listItem?.name && listItem.name[0].toUpperCase();
|
|
676
|
+
if (!hideStickyHeader && chr !== currentLetter && !ItemView) {
|
|
677
|
+
currentLetter = chr;
|
|
678
|
+
listWithHeaders.push({
|
|
679
|
+
value: currentLetter,
|
|
680
|
+
header: true,
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
listWithHeaders.push({ value: listItem, header: false });
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
messageContainer = (
|
|
687
|
+
<View style={styles.listContainerStyle}>
|
|
688
|
+
<FlatList
|
|
689
|
+
data={listWithHeaders}
|
|
690
|
+
extraData={{ selectedItems, theme, list, selectionMode }}
|
|
691
|
+
renderItem={
|
|
692
|
+
ItemView
|
|
693
|
+
? ({ item, index, separators }) => {
|
|
694
|
+
return ItemView(item?.value);
|
|
695
|
+
}
|
|
696
|
+
: renderItemView
|
|
697
|
+
}
|
|
698
|
+
keyExtractor={(item, index) => {
|
|
699
|
+
const itemValue = { ...item.value };
|
|
700
|
+
let key = itemValue[listItemKey] ? `${itemValue[listItemKey]}` : undefined;
|
|
701
|
+
if (!key) {
|
|
702
|
+
//section header is also an item in the list
|
|
703
|
+
if (itemValue[0] && itemValue[0].length === 1) {
|
|
704
|
+
key = itemValue[0] + "_" + index;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
return key ?? index + "";
|
|
708
|
+
}}
|
|
709
|
+
onMomentumScrollEnd={(event) => {
|
|
710
|
+
const contentOffsetY = event.nativeEvent.contentOffset.y;
|
|
711
|
+
const contentHeight = event.nativeEvent.contentSize.height;
|
|
712
|
+
const layoutHeight = event.nativeEvent.layoutMeasurement.height;
|
|
713
|
+
|
|
714
|
+
if (contentOffsetY + layoutHeight >= contentHeight - 10) {
|
|
715
|
+
handleList();
|
|
716
|
+
}
|
|
717
|
+
}}
|
|
718
|
+
showsVerticalScrollIndicator={false}
|
|
719
|
+
ListFooterComponent={renderFooter}
|
|
720
|
+
keyboardShouldPersistTaps='always'
|
|
721
|
+
/>
|
|
722
|
+
</View>
|
|
723
|
+
);
|
|
724
|
+
}
|
|
754
725
|
}
|
|
755
|
-
}
|
|
756
726
|
|
|
757
|
-
|
|
758
|
-
|
|
727
|
+
return messageContainer;
|
|
728
|
+
}, [list, selectedItems, theme, dataLoadingStatus, isLoadingMore, hasMoreData, shouldSelect]);
|
|
759
729
|
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
listStyle?.
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
730
|
+
/**
|
|
731
|
+
* Handle the rendering based on loading status
|
|
732
|
+
*/
|
|
733
|
+
// if (list.length === 0 && dataLoadingStatus.toLowerCase() === LOADING) {
|
|
734
|
+
// if (LoadingView) return <LoadingView />;
|
|
735
|
+
// } else {
|
|
736
|
+
return (
|
|
737
|
+
<View style={{ flex: 1 }}>
|
|
738
|
+
<Header
|
|
739
|
+
hideHeader={hideHeader ?? hideHeader}
|
|
740
|
+
backButtonIconContainerStyle={listStyle?.backButtonIconContainerStyle}
|
|
741
|
+
backButtonIcon={listStyle?.backButtonIcon}
|
|
742
|
+
backButtonIconStyle={listStyle?.backButtonIconStyle}
|
|
743
|
+
hideBackButton={hideBackButton}
|
|
744
|
+
containerStyle={listStyle?.headerContainerStyle}
|
|
745
|
+
titleSeparatorStyle={listStyle?.titleSeparatorStyle}
|
|
746
|
+
titleViewStyle={listStyle?.titleViewStyle}
|
|
747
|
+
onBack={onBack}
|
|
748
|
+
title={title}
|
|
749
|
+
titleStyle={listStyle?.titleStyle}
|
|
750
|
+
AppBarOptions={AppBarOptions}
|
|
751
|
+
shouldSelect={shouldSelect}
|
|
752
|
+
hideSubmitButton={hideSubmitButton}
|
|
753
|
+
onCancel={handleCancelSelection}
|
|
754
|
+
onConfirm={handleConfirmSelection}
|
|
755
|
+
hideSearch={hideSearch}
|
|
756
|
+
searchPlaceholderText={searchPlaceholderText}
|
|
757
|
+
searchHandler={searchHandler}
|
|
758
|
+
searchInput={searchInput}
|
|
759
|
+
onSubmitEditing={() => searchHandler(searchInput)}
|
|
760
|
+
selectionCancelStyle={listStyle?.selectionCancelStyle}
|
|
761
|
+
confirmSelectionStyle={listStyle?.confirmSelectionStyle}
|
|
762
|
+
searchStyle={listStyle?.searchStyle}
|
|
763
|
+
selectedCount={selectedCount}
|
|
764
|
+
/>
|
|
765
|
+
<View style={styles.container}>{getMessageContainer()}</View>
|
|
766
|
+
{list.length === 0 && dataLoadingStatus.toLowerCase() === LOADING ? (
|
|
767
|
+
LoadingView ? (
|
|
768
|
+
<LoadingView />
|
|
769
|
+
) : (
|
|
770
|
+
<View style={styles.msgContainerStyle}>
|
|
771
|
+
<ActivityIndicator
|
|
772
|
+
size={theme.spacing.spacing.s10}
|
|
773
|
+
color={listStyle?.loadingIconTint || theme.color.iconSecondary}
|
|
774
|
+
/>
|
|
775
|
+
</View>
|
|
776
|
+
)
|
|
777
|
+
) : null}
|
|
778
|
+
{/* Add a fallback like `null` if nothing needs to be rendered */}
|
|
779
|
+
</View>
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
// }
|
|
783
|
+
);
|