@cometchat/chat-uikit-react-native 4.0.0-beta.1.1 → 4.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 +10 -4
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/.gitignore +3 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/build.gradle +2 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +234 -0
- package/android/gradlew.bat +89 -0
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +19 -2
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatImageViewer.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatVideoPlayer.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometChatWebView.java +38 -0
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -0
- package/android/src/main/java/com/reactnativecometchatuikit/FileManager.java +223 -1
- package/android/src/main/java/com/reactnativecometchatuikit/WebViewManager.java +38 -0
- package/android/src/main/res/xml/filepaths.xml +6 -0
- package/ios/CometchatUiKit.xcodeproj/project.pbxproj +12 -0
- package/ios/CometchatUiKit.xcodeproj/project.xcworkspace/xcuserdata/ashishjajoo.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/FileManager.m +265 -37
- package/ios/WebViewManager.h +7 -0
- package/ios/WebViewManager.m +33 -0
- package/lib/CometChatAddMembers/AddMembersConfiguration.d.ts +1 -1
- package/lib/CometChatAddMembers/CometChatAddMembers.d.ts +1 -1
- package/lib/CometChatAddMembers/CometChatAddMembers.js +1 -1
- package/lib/CometChatBannedMembers/BannedMembersConfiguration.d.ts +1 -1
- package/lib/CometChatBannedMembers/CometChatBannedMembers.d.ts +1 -1
- package/lib/CometChatBannedMembers/CometChatBannedMembers.js +1 -1
- package/lib/CometChatContacts/CometChatContacts.d.ts +75 -0
- package/lib/CometChatContacts/CometChatContacts.js +84 -0
- package/lib/CometChatContacts/CometChatContacts.js.map +1 -0
- package/lib/CometChatContacts/ContactsConfiguration.d.ts +73 -0
- package/lib/CometChatContacts/ContactsConfiguration.js +2 -0
- package/lib/CometChatContacts/ContactsConfiguration.js.map +1 -0
- package/lib/CometChatContacts/ContactsStyle.d.ts +59 -0
- package/lib/CometChatContacts/ContactsStyle.js +2 -0
- package/lib/CometChatContacts/ContactsStyle.js.map +1 -0
- package/lib/CometChatContacts/Header.d.ts +31 -0
- package/lib/CometChatContacts/Header.js +72 -0
- package/lib/CometChatContacts/Header.js.map +1 -0
- package/lib/CometChatContacts/index.d.ts +4 -0
- package/lib/CometChatContacts/index.js +3 -0
- package/lib/CometChatContacts/index.js.map +1 -0
- package/lib/CometChatContacts/styles.d.ts +101 -0
- package/lib/CometChatContacts/styles.js +104 -0
- package/lib/CometChatContacts/styles.js.map +1 -0
- package/lib/CometChatConversations/CometChatConversations.d.ts +5 -1
- package/lib/CometChatConversations/CometChatConversations.js +22 -7
- package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
- package/lib/CometChatConversations/ConversationsConfiguration.d.ts +1 -1
- package/lib/CometChatConversations/style.d.ts +4 -4
- package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.d.ts +3 -1
- package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.js +84 -5
- package/lib/CometChatConversationsWithMessages/CometChatConversationsWithMessages.js.map +1 -1
- package/lib/CometChatConversationsWithMessages/resources/index.d.ts +2 -0
- package/lib/CometChatConversationsWithMessages/resources/index.js +3 -0
- package/lib/CometChatConversationsWithMessages/resources/index.js.map +1 -0
- package/lib/CometChatConversationsWithMessages/styles.d.ts +4 -4
- package/lib/CometChatCreateGroup/CometChatCreateGroup.d.ts +1 -1
- package/lib/CometChatCreateGroup/CometChatCreateGroup.js +1 -1
- package/lib/CometChatCreateGroup/CreateGroupConfiguration.d.ts +1 -1
- package/lib/CometChatDetails/CometChatDetails.d.ts +1 -1
- package/lib/CometChatDetails/CometChatDetails.js +2 -1
- package/lib/CometChatDetails/CometChatDetails.js.map +1 -1
- package/lib/CometChatDetails/DetailsConfiguration.d.ts +1 -1
- package/lib/CometChatDetails/listners.js +1 -1
- package/lib/CometChatGroupMembers/CometChatGroupMembers.d.ts +1 -1
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js +13 -1
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js.map +1 -1
- package/lib/CometChatGroupMembers/GroupMemberConfiguration.d.ts +1 -1
- package/lib/CometChatGroupMembers/style.d.ts +5 -5
- package/lib/CometChatGroups/CometChatGroups.d.ts +5 -1
- package/lib/CometChatGroups/CometChatGroups.js +18 -5
- package/lib/CometChatGroups/CometChatGroups.js.map +1 -1
- package/lib/CometChatGroups/GroupsConfiguration.d.ts +1 -1
- package/lib/CometChatGroups/style.d.ts +1 -1
- package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.d.ts +1 -1
- package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.js +71 -8
- package/lib/CometChatGroupsWithMessages/CometChatGroupsWithMessages.js.map +1 -1
- package/lib/CometChatGroupsWithMessages/styles.d.ts +4 -4
- package/lib/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.d.ts +1 -1
- package/lib/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.js +1 -1
- package/lib/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.d.ts +1 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.d.ts +65 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +39 -5
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageComposer/MessageComposerConfiguration.d.ts +11 -1
- package/lib/CometChatMessageComposer/MessageComposerConfiguration.js +9 -0
- package/lib/CometChatMessageComposer/MessageComposerConfiguration.js.map +1 -1
- package/lib/CometChatMessageComposer/resources/index.d.ts +1 -0
- package/lib/CometChatMessageComposer/resources/index.js +3 -1
- package/lib/CometChatMessageComposer/resources/index.js.map +1 -1
- package/lib/CometChatMessageComposer/styles.d.ts +1 -0
- package/lib/CometChatMessageComposer/styles.js +2 -1
- package/lib/CometChatMessageComposer/styles.js.map +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.d.ts +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js +7 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
- package/lib/CometChatMessageHeader/MessageHeaderConfiguration.d.ts +1 -1
- package/lib/CometChatMessageHeader/listners.js +1 -1
- package/lib/CometChatMessageHeader/styles.d.ts +1 -1
- package/lib/CometChatMessageInformation/CometChatMessageInformation.d.ts +36 -0
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js +173 -0
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js.map +1 -0
- package/lib/CometChatMessageInformation/MessageInformationConfiguration.d.ts +3 -0
- package/lib/CometChatMessageInformation/MessageInformationConfiguration.js +2 -0
- package/lib/CometChatMessageInformation/MessageInformationConfiguration.js.map +1 -0
- package/lib/CometChatMessageInformation/MessageInformationStyle.d.ts +11 -0
- package/lib/CometChatMessageInformation/MessageInformationStyle.js +2 -0
- package/lib/CometChatMessageInformation/MessageInformationStyle.js.map +1 -0
- package/lib/CometChatMessageInformation/index.d.ts +4 -0
- package/lib/CometChatMessageInformation/index.js +3 -0
- package/lib/CometChatMessageInformation/index.js.map +1 -0
- package/lib/CometChatMessageInformation/resources/index.d.ts +2 -0
- package/lib/CometChatMessageInformation/resources/index.js +3 -0
- package/lib/CometChatMessageInformation/resources/index.js.map +1 -0
- package/lib/CometChatMessageInformation/styles.d.ts +23 -0
- package/lib/CometChatMessageInformation/styles.js +26 -0
- package/lib/CometChatMessageInformation/styles.js.map +1 -0
- package/lib/CometChatMessageList/CometChatMessageList.d.ts +3 -1
- package/lib/CometChatMessageList/CometChatMessageList.js +261 -18
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/MessageListConfiguration.d.ts +1 -1
- package/lib/CometChatMessageList/style.d.ts +3 -3
- package/lib/CometChatMessages/CometChatMessages.d.ts +1 -1
- package/lib/CometChatMessages/CometChatMessages.js +34 -1
- package/lib/CometChatMessages/CometChatMessages.js.map +1 -1
- package/lib/CometChatMessages/MessagesConfiguration.d.ts +1 -1
- package/lib/CometChatMessages/style.d.ts +2 -2
- package/lib/CometChatTabs/CometChatTabs.d.ts +1 -0
- package/lib/CometChatTabs/CometChatTabs.js +61 -22
- package/lib/CometChatTabs/CometChatTabs.js.map +1 -1
- package/lib/CometChatTabs/CometChatTabsStyle.d.ts +12 -2
- package/lib/CometChatTabs/CometChatTabsStyle.js +11 -1
- package/lib/CometChatTabs/CometChatTabsStyle.js.map +1 -1
- package/lib/CometChatTabs/TabItemStyle.d.ts +4 -2
- package/lib/CometChatTabs/TabItemStyle.js +3 -1
- package/lib/CometChatTabs/TabItemStyle.js.map +1 -1
- package/lib/CometChatThreadedMessages/CometChatThreadedMessages.d.ts +1 -1
- package/lib/CometChatThreadedMessages/CometChatThreadedMessages.js +5 -3
- package/lib/CometChatThreadedMessages/CometChatThreadedMessages.js.map +1 -1
- package/lib/CometChatThreadedMessages/ThreadedMessagesConfiguration.d.ts +1 -1
- package/lib/CometChatThreadedMessages/style.d.ts +3 -2
- package/lib/CometChatThreadedMessages/style.js +4 -2
- package/lib/CometChatThreadedMessages/style.js.map +1 -1
- package/lib/CometChatTransferOwnership/CometChatTransferOwnership.d.ts +1 -1
- package/lib/CometChatTransferOwnership/CometChatTransferOwnership.js +1 -1
- package/lib/CometChatTransferOwnership/TransferOwnershipConfiguration.d.ts +1 -1
- package/lib/CometChatUsers/CometChatUsers.d.ts +1 -1
- package/lib/CometChatUsers/CometChatUsers.js +1 -1
- package/lib/CometChatUsers/UsersConfiguration.d.ts +1 -1
- package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.d.ts +1 -1
- package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.js +29 -3
- package/lib/CometChatUsersWithMessages/CometChatUsersWithMessages.js.map +1 -1
- package/lib/CometChatUsersWithMessages/styles.d.ts +4 -4
- package/lib/calls/CallUtils.d.ts +1 -1
- package/lib/calls/CallUtils.js +1 -1
- package/lib/calls/CallingDetailsUtils.d.ts +1 -1
- package/lib/calls/CallingExtension.d.ts +3 -1
- package/lib/calls/CallingExtension.js +8 -2
- package/lib/calls/CallingExtension.js.map +1 -1
- package/lib/calls/CallingExtentionDecorator.d.ts +1 -1
- package/lib/calls/CallingExtentionDecorator.js +5 -2
- package/lib/calls/CallingExtentionDecorator.js.map +1 -1
- package/lib/calls/CometChatCallButtons/CometChatCallButtonConfiguration.d.ts +1 -1
- package/lib/calls/CometChatCallButtons/CometChatCallButtons.d.ts +1 -1
- package/lib/calls/CometChatCallButtons/CometChatCallButtons.js +1 -1
- package/lib/calls/CometChatCallDetails/CallDetailsConfiguration.d.ts +1 -1
- package/lib/calls/CometChatCallDetails/CometChatCallDetails.js +1 -1
- package/lib/calls/CometChatCallHistory/CallHistoryConfiguration.d.ts +1 -1
- package/lib/calls/CometChatCallHistory/CometChatCallHistory.js +1 -1
- package/lib/calls/CometChatCallHistoryWithDetails/style.d.ts +2 -2
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -1
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +1 -1
- package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.d.ts +1 -1
- package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js +1 -1
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -1
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +23 -15
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
- package/lib/extensions/CollaborativeBubble/CollaborativeBubbleStyle.js +1 -1
- package/lib/extensions/CollaborativeBubble/CollaborativeBubbleStyle.js.map +1 -1
- package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.d.ts +1 -1
- package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js +5 -4
- package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js.map +1 -1
- package/lib/extensions/CollaborativeBubble/styles.js +1 -1
- package/lib/extensions/CollaborativeBubble/styles.js.map +1 -1
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.d.ts +3 -2
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.js +8 -3
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtension.js.map +1 -1
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +1 -1
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js +1 -1
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.d.ts +3 -2
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.js +10 -3
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.js.map +1 -1
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +1 -1
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js +1 -1
- package/lib/extensions/ImageModeration/ImageModerationDecorator.d.ts +1 -1
- package/lib/extensions/ImageModeration/ImageModerationDecorator.js +1 -1
- package/lib/extensions/ImageModeration/ImageModerationExtension.d.ts +3 -2
- package/lib/extensions/ImageModeration/ImageModerationExtension.js +10 -3
- package/lib/extensions/ImageModeration/ImageModerationExtension.js.map +1 -1
- package/lib/extensions/ImageModeration/ImageModerationFilter.d.ts +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewExtention.d.ts +3 -2
- package/lib/extensions/LinkPreview/LinkPreviewExtention.js +10 -3
- package/lib/extensions/LinkPreview/LinkPreviewExtention.js.map +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewExtentionDecorator.d.ts +1 -1
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.d.ts +1 -1
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js +1 -1
- package/lib/extensions/MessageTranslation/MessageTranslationExtension.d.ts +3 -2
- package/lib/extensions/MessageTranslation/MessageTranslationExtension.js +10 -3
- package/lib/extensions/MessageTranslation/MessageTranslationExtension.js.map +1 -1
- package/lib/extensions/Polls/Polls.d.ts +1 -1
- package/lib/extensions/Polls/Polls.js +1 -1
- package/lib/extensions/Polls/PollsBubble.d.ts +1 -1
- package/lib/extensions/Polls/PollsDecorator.d.ts +1 -1
- package/lib/extensions/Polls/PollsDecorator.js +1 -1
- package/lib/extensions/Polls/PollsExtension.d.ts +3 -2
- package/lib/extensions/Polls/PollsExtension.js +10 -3
- package/lib/extensions/Polls/PollsExtension.js.map +1 -1
- package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.d.ts +1 -1
- package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.js +0 -2
- package/lib/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.js.map +1 -1
- package/lib/extensions/Reactions/ReactionsDecorator.d.ts +1 -1
- package/lib/extensions/Reactions/ReactionsDecorator.js +1 -1
- package/lib/extensions/Reactions/ReactionsExtension.d.ts +3 -2
- package/lib/extensions/Reactions/ReactionsExtension.js +10 -3
- package/lib/extensions/Reactions/ReactionsExtension.js.map +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.d.ts +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.js +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesExtension.d.ts +3 -2
- package/lib/extensions/SmartReplies/SmartRepliesExtension.js +10 -3
- package/lib/extensions/SmartReplies/SmartRepliesExtension.js.map +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.d.ts +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.d.ts +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/style.d.ts +6 -6
- package/lib/extensions/Stickers/StickersExtension.d.ts +3 -2
- package/lib/extensions/Stickers/StickersExtension.js +10 -4
- package/lib/extensions/Stickers/StickersExtension.js.map +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.js +1 -1
- package/lib/extensions/TextModeration/TextModerationExtension.d.ts +3 -1
- package/lib/extensions/TextModeration/TextModerationExtension.js +19 -2
- package/lib/extensions/TextModeration/TextModerationExtension.js.map +1 -1
- package/lib/extensions/TextModeration/TextModerationExtensionDecorator.d.ts +1 -1
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.d.ts +1 -1
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.d.ts +3 -2
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.js +10 -3
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +6 -4
- package/lib/index.js.map +1 -1
- package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +8 -1
- package/lib/shared/CometChatUiKit/CometChatUIKit.js +54 -18
- package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
- package/lib/shared/CometChatUiKit/CometChatUIKitHelper.d.ts +1 -1
- package/lib/shared/CometChatUiKit/UIKitSettings.d.ts +3 -3
- package/lib/shared/CometChatUiKit/UIKitSettings.js +3 -11
- package/lib/shared/CometChatUiKit/UIKitSettings.js.map +1 -1
- package/lib/shared/assets/images/index.d.ts +9 -0
- package/lib/shared/assets/images/index.js +17 -0
- package/lib/shared/assets/images/index.js.map +1 -0
- package/lib/shared/constants/UIKitConstants.d.ts +0 -1
- package/lib/shared/constants/UIKitConstants.js +3 -3
- package/lib/shared/constants/UIKitConstants.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +6 -0
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +4 -2
- package/lib/shared/events/CometChatUIEventHandler/Listener.js +9 -2
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/CometChatUIEvents.d.ts +1 -0
- package/lib/shared/events/CometChatUIEvents.js +1 -0
- package/lib/shared/events/CometChatUIEvents.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +1 -1
- package/lib/shared/framework/DataSourceDecorator.d.ts +1 -1
- package/lib/shared/framework/ExtensionsDataSource.d.ts +5 -2
- package/lib/shared/framework/ExtensionsDataSource.js +13 -1
- package/lib/shared/framework/ExtensionsDataSource.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +2 -2
- package/lib/shared/framework/MessageDataSource.js +39 -17
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/framework/index.js +2 -1
- package/lib/shared/framework/index.js.map +1 -1
- package/lib/shared/framework/resources/index.d.ts +5 -1
- package/lib/shared/framework/resources/index.js +13 -3
- package/lib/shared/framework/resources/index.js.map +1 -1
- package/lib/shared/helper/Toast.d.ts +4 -0
- package/lib/shared/helper/Toast.js +23 -0
- package/lib/shared/helper/Toast.js.map +1 -0
- package/lib/shared/helper/types/index.d.ts +3 -4
- package/lib/shared/index.d.ts +2 -2
- package/lib/shared/index.js +4 -4
- package/lib/shared/index.js.map +1 -1
- package/lib/shared/modals/CometChatMessageOption.d.ts +1 -1
- package/lib/shared/modals/CometChatMessageTemplate.d.ts +1 -1
- package/lib/shared/modals/CometChatMessageTemplate.js +1 -1
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +78 -0
- package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +9 -3
- package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +7 -1
- package/lib/shared/utils/CometChatMessageHelper/index.js +1 -1
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +2 -1
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js.map +1 -1
- package/lib/shared/utils/CometChatMessagePreview/style.d.ts +1 -0
- package/lib/shared/utils/CometChatMessagePreview/style.js +19 -5
- package/lib/shared/utils/CometChatMessagePreview/style.js.map +1 -1
- package/lib/shared/utils/DetailsUtils/DetailsUtils.d.ts +1 -1
- package/lib/shared/utils/MessageUtils.d.ts +15 -0
- package/lib/shared/utils/MessageUtils.js +31 -0
- package/lib/shared/utils/MessageUtils.js.map +1 -0
- package/lib/shared/utils/conversationUtils.d.ts +1 -1
- package/lib/shared/utils/conversationUtils.js +1 -1
- package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js +3 -3
- package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js.map +1 -1
- package/lib/shared/views/CometChatAvatar/styles.d.ts +2 -2
- package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js +1 -1
- package/lib/shared/views/CometChatBottomSheet/style.d.ts +1 -1
- package/lib/shared/views/CometChatCard/style.d.ts +2 -2
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js +38 -21
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
- package/lib/shared/views/CometChatEmojiKeyboard/style.d.ts +1 -1
- package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js +12 -9
- package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js.map +1 -1
- package/lib/shared/views/CometChatFileBubble/resources/index.d.ts +2 -1
- package/lib/shared/views/CometChatFileBubble/resources/index.js +2 -1
- package/lib/shared/views/CometChatFileBubble/resources/index.js.map +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js +28 -10
- package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js.map +1 -1
- package/lib/shared/views/CometChatList/CometChatList.d.ts +2 -0
- package/lib/shared/views/CometChatList/CometChatList.js +51 -4
- package/lib/shared/views/CometChatList/CometChatList.js.map +1 -1
- package/lib/shared/views/CometChatList/Header.d.ts +1 -1
- package/lib/shared/views/CometChatList/Header.js +2 -2
- package/lib/shared/views/CometChatList/Header.js.map +1 -1
- package/lib/shared/views/CometChatList/styles.d.ts +8 -8
- package/lib/shared/views/CometChatListItem/style.d.ts +5 -5
- package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.d.ts +25 -0
- package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js +151 -0
- package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js.map +1 -0
- package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.d.ts +26 -0
- package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.js +33 -0
- package/lib/shared/views/CometChatMediaRecorder/MediaRecorderStyle.js.map +1 -0
- package/lib/shared/views/CometChatMediaRecorder/index.d.ts +3 -0
- package/lib/shared/views/CometChatMediaRecorder/index.js +4 -0
- package/lib/shared/views/CometChatMediaRecorder/index.js.map +1 -0
- package/lib/shared/views/CometChatMediaRecorder/style.d.ts +27 -0
- package/lib/shared/views/CometChatMediaRecorder/style.js +28 -0
- package/lib/shared/views/CometChatMediaRecorder/style.js.map +1 -0
- package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js +2 -2
- package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js.map +1 -1
- package/lib/shared/views/CometChatMessageInput/styles.d.ts +1 -0
- package/lib/shared/views/CometChatMessageInput/styles.js +1 -0
- package/lib/shared/views/CometChatMessageInput/styles.js.map +1 -1
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js +23 -4
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js.map +1 -1
- package/lib/shared/views/SwipeRow/style.d.ts +3 -3
- package/lib/shared/views/index.d.ts +2 -1
- package/lib/shared/views/index.js +2 -1
- package/lib/shared/views/index.js.map +1 -1
- package/package.json +7 -6
- package/src/.DS_Store +0 -0
- package/src/CometChatAddMembers/AddMembersConfiguration.tsx +57 -0
- package/src/CometChatAddMembers/CometChatAddMembers.tsx +100 -0
- package/src/CometChatAddMembers/index.ts +8 -0
- package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +60 -0
- package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +142 -0
- package/src/CometChatBannedMembers/index.ts +8 -0
- package/src/CometChatBannedMembers/resources/index.ts +3 -0
- package/src/CometChatContacts/CometChatContacts.tsx +226 -0
- package/src/CometChatContacts/ContactsConfiguration.tsx +68 -0
- package/src/CometChatContacts/ContactsStyle.ts +60 -0
- package/src/CometChatContacts/Header.tsx +167 -0
- package/src/CometChatContacts/index.ts +11 -0
- package/src/CometChatContacts/styles.ts +105 -0
- package/src/CometChatConversations/CometChatConversations.tsx +1034 -0
- package/src/CometChatConversations/ConversationsConfiguration.ts +181 -0
- package/src/CometChatConversations/ConversationsStyle.ts +88 -0
- package/src/CometChatConversations/index.ts +12 -0
- package/src/CometChatConversations/resources/index.ts +29 -0
- package/src/CometChatConversations/style.ts +63 -0
- package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +230 -0
- package/src/CometChatConversationsWithMessages/index.ts +5 -0
- package/src/CometChatConversationsWithMessages/resources/index.ts +5 -0
- package/src/CometChatConversationsWithMessages/resources/start.png +0 -0
- package/src/CometChatConversationsWithMessages/styles.ts +15 -0
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +387 -0
- package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +35 -0
- package/src/CometChatCreateGroup/Header.tsx +60 -0
- package/src/CometChatCreateGroup/index.ts +16 -0
- package/src/CometChatCreateGroup/resources/index.ts +8 -0
- package/src/CometChatCreateGroup/style.ts +44 -0
- package/src/CometChatDetails/CometChatDetails.tsx +980 -0
- package/src/CometChatDetails/DetailsConfiguration.tsx +71 -0
- package/src/CometChatDetails/Header.tsx +42 -0
- package/src/CometChatDetails/index.ts +17 -0
- package/src/CometChatDetails/listners.ts +88 -0
- package/src/CometChatDetails/resources/index.ts +12 -0
- package/src/CometChatDetails/styles.ts +23 -0
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +639 -0
- package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +94 -0
- package/src/CometChatGroupMembers/GroupMemberStyle.ts +91 -0
- package/src/CometChatGroupMembers/GroupScopeStyle.ts +68 -0
- package/src/CometChatGroupMembers/index.ts +16 -0
- package/src/CometChatGroupMembers/resources/index.ts +11 -0
- package/src/CometChatGroupMembers/style.ts +31 -0
- package/src/CometChatGroups/CometChatGroups.tsx +611 -0
- package/src/CometChatGroups/GroupsConfiguration.ts +121 -0
- package/src/CometChatGroups/GroupsStyle.ts +112 -0
- package/src/CometChatGroups/index.ts +12 -0
- package/src/CometChatGroups/resources/index.ts +21 -0
- package/src/CometChatGroups/style.ts +19 -0
- package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +231 -0
- package/src/CometChatGroupsWithMessages/index.ts +5 -0
- package/src/CometChatGroupsWithMessages/resources/index.ts +4 -0
- package/src/CometChatGroupsWithMessages/styles.ts +15 -0
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +270 -0
- package/src/CometChatJoinProtectedGroup/Header.tsx +52 -0
- package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +29 -0
- package/src/CometChatJoinProtectedGroup/index.ts +16 -0
- package/src/CometChatJoinProtectedGroup/resources/index.ts +6 -0
- package/src/CometChatJoinProtectedGroup/style.ts +11 -0
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +1262 -0
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +81 -0
- package/src/CometChatMessageComposer/index.ts +17 -0
- package/src/CometChatMessageComposer/resources/index.ts +19 -0
- package/src/CometChatMessageComposer/resources/microphone.png +0 -0
- package/src/CometChatMessageComposer/styles.ts +31 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +504 -0
- package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +61 -0
- package/src/CometChatMessageHeader/index.ts +16 -0
- package/src/CometChatMessageHeader/listners.ts +73 -0
- package/src/CometChatMessageHeader/resources/index.ts +8 -0
- package/src/CometChatMessageHeader/styles.ts +16 -0
- package/src/CometChatMessageInformation/.DS_Store +0 -0
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +302 -0
- package/src/CometChatMessageInformation/MessageInformationConfiguration.tsx +13 -0
- package/src/CometChatMessageInformation/MessageInformationStyle.ts +12 -0
- package/src/CometChatMessageInformation/index.ts +13 -0
- package/src/CometChatMessageInformation/resources/index.ts +5 -0
- package/src/CometChatMessageInformation/styles.ts +26 -0
- package/src/CometChatMessageList/CometChatMessageList.tsx +1408 -0
- package/src/CometChatMessageList/MessageListConfiguration.ts +130 -0
- package/src/CometChatMessageList/MessageListStyle.ts +75 -0
- package/src/CometChatMessageList/index.ts +23 -0
- package/src/CometChatMessageList/resources/index.ts +13 -0
- package/src/CometChatMessageList/style.ts +55 -0
- package/src/CometChatMessages/CometChatMessages.tsx +334 -0
- package/src/CometChatMessages/MessageStyle.ts +34 -0
- package/src/CometChatMessages/MessagesConfiguration.ts +53 -0
- package/src/CometChatMessages/index.ts +15 -0
- package/src/CometChatMessages/resources/index.ts +5 -0
- package/src/CometChatMessages/style.ts +24 -0
- package/src/CometChatTabs/CometChatTabs.tsx +190 -0
- package/src/CometChatTabs/CometChatTabsStyle.ts +43 -0
- package/src/CometChatTabs/TabItemStyle.ts +55 -0
- package/src/CometChatTabs/TabItems.ts +11 -0
- package/src/CometChatTabs/index.ts +11 -0
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +294 -0
- package/src/CometChatThreadedMessages/Header.tsx +57 -0
- package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +29 -0
- package/src/CometChatThreadedMessages/index.ts +16 -0
- package/src/CometChatThreadedMessages/resources/index.ts +14 -0
- package/src/CometChatThreadedMessages/style.ts +27 -0
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +144 -0
- package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +59 -0
- package/src/CometChatTransferOwnership/index.ts +15 -0
- package/src/CometChatUsers/CometChatUsers.tsx +173 -0
- package/src/CometChatUsers/UsersConfiguration.tsx +58 -0
- package/src/CometChatUsers/index.ts +14 -0
- package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +127 -0
- package/src/CometChatUsersWithMessages/index.ts +5 -0
- package/src/CometChatUsersWithMessages/styles.ts +15 -0
- package/src/calls/CallEvents.ts +9 -0
- package/src/calls/CallUtils.ts +71 -0
- package/src/calls/CallingConfiguration.ts +5 -0
- package/src/calls/CallingDetailsUtils.tsx +39 -0
- package/src/calls/CallingExtension.tsx +48 -0
- package/src/calls/CallingExtentionDecorator.tsx +204 -0
- package/src/calls/CallingPackage.ts +8 -0
- package/src/calls/CometChatCallBubble/CallBubbleConfiguration.ts +23 -0
- package/src/calls/CometChatCallBubble/CallBubbleStyle.ts +47 -0
- package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +54 -0
- package/src/calls/CometChatCallBubble/index.ts +11 -0
- package/src/calls/CometChatCallBubble/resources/index.ts +9 -0
- package/src/calls/CometChatCallBubble/styles.ts +22 -0
- package/src/calls/CometChatCallButtons/CallButtonStyle.ts +35 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +41 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +340 -0
- package/src/calls/CometChatCallButtons/index.ts +11 -0
- package/src/calls/CometChatCallButtons/resources/index.ts +7 -0
- package/src/calls/CometChatCallButtons/style.ts +14 -0
- package/src/calls/CometChatCallDetails/CallDetailsConfiguration.ts +68 -0
- package/src/calls/CometChatCallDetails/CallDetailsStyle.ts +52 -0
- package/src/calls/CometChatCallDetails/CometChatCallDetails.tsx +268 -0
- package/src/calls/CometChatCallDetails/index.ts +9 -0
- package/src/calls/CometChatCallDetails/resources/index.ts +4 -0
- package/src/calls/CometChatCallDetails/style.ts +14 -0
- package/src/calls/CometChatCallHistory/.DS_Store +0 -0
- package/src/calls/CometChatCallHistory/CallHistoryConfiguration.ts +77 -0
- package/src/calls/CometChatCallHistory/CallHistoryStyle.ts +34 -0
- package/src/calls/CometChatCallHistory/CometChatCallHistory.tsx +422 -0
- package/src/calls/CometChatCallHistory/index.ts +9 -0
- package/src/calls/CometChatCallHistory/resources/index.ts +17 -0
- package/src/calls/CometChatCallHistory/style.ts +23 -0
- package/src/calls/CometChatCallHistoryWithDetails/CometChatCallHistoryWithDetails.tsx +54 -0
- package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsConfiguration.ts +7 -0
- package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsStyle.ts +3 -0
- package/src/calls/CometChatCallHistoryWithDetails/index.ts +8 -0
- package/src/calls/CometChatCallHistoryWithDetails/style.ts +11 -0
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +276 -0
- package/src/calls/CometChatIncomingCall/IncomingCallStyle.ts +75 -0
- package/src/calls/CometChatIncomingCall/index.ts +9 -0
- package/src/calls/CometChatIncomingCall/resources/index.ts +11 -0
- package/src/calls/CometChatIncomingCall/styles.ts +11 -0
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +67 -0
- package/src/calls/CometChatOngoingCall/OngoingCallStyle.ts +25 -0
- package/src/calls/CometChatOngoingCall/index.ts +8 -0
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +263 -0
- package/src/calls/CometChatOutgoingCall/OutgoingCallConfiguration.ts +33 -0
- package/src/calls/CometChatOutgoingCall/OutgoingCallStyle.ts +39 -0
- package/src/calls/CometChatOutgoingCall/index.ts +9 -0
- package/src/calls/CometChatOutgoingCall/resources/index.ts +5 -0
- package/src/calls/index.ts +39 -0
- package/src/calls/resources/index.ts +7 -0
- package/src/extensions/CollaborativeBubble/CollaborativeBubbleStyle.ts +97 -0
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +106 -0
- package/src/extensions/CollaborativeBubble/resources/index.ts +4 -0
- package/src/extensions/CollaborativeBubble/styles.ts +80 -0
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +26 -0
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtension.tsx +38 -0
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +204 -0
- package/src/extensions/CollaborativeDocument/index.ts +12 -0
- package/src/extensions/CollaborativeDocument/resources/index.ts +5 -0
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +26 -0
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.tsx +38 -0
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +209 -0
- package/src/extensions/CollaborativeWhiteboard/index.ts +12 -0
- package/src/extensions/CollaborativeWhiteboard/resources/index.ts +5 -0
- package/src/extensions/ExtensionConstants.tsx +54 -0
- package/src/extensions/ExtensionModerator.tsx +60 -0
- package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +82 -0
- package/src/extensions/ImageModeration/ImageModerationExtension.tsx +43 -0
- package/src/extensions/ImageModeration/ImageModerationFilter.tsx +145 -0
- package/src/extensions/ImageModeration/index.ts +10 -0
- package/src/extensions/ImageModeration/resources/index.ts +3 -0
- package/src/extensions/LinkPreview/LInkPreviewBubbleStyle.ts +28 -0
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +73 -0
- package/src/extensions/LinkPreview/LinkPreviewConfiguration.ts +27 -0
- package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +25 -0
- package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +54 -0
- package/src/extensions/LinkPreview/index.ts +15 -0
- package/src/extensions/LinkPreview/resources/index.ts +5 -0
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +128 -0
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +216 -0
- package/src/extensions/MessageTranslation/MessageTranslationExtension.tsx +47 -0
- package/src/extensions/MessageTranslation/index.ts +13 -0
- package/src/extensions/MessageTranslation/resources/index.ts +5 -0
- package/src/extensions/Polls/Header.tsx +71 -0
- package/src/extensions/Polls/Polls.tsx +454 -0
- package/src/extensions/Polls/PollsBubble.tsx +330 -0
- package/src/extensions/Polls/PollsConfigurations.ts +16 -0
- package/src/extensions/Polls/PollsDecorator.tsx +172 -0
- package/src/extensions/Polls/PollsExtension.tsx +39 -0
- package/src/extensions/Polls/index.ts +14 -0
- package/src/extensions/Polls/resources/index.ts +14 -0
- package/src/extensions/Polls/style.ts +40 -0
- package/src/extensions/Reactions/CometChatMessageReactions/CometChatMessageReactions.tsx +249 -0
- package/src/extensions/Reactions/CometChatMessageReactions/index.ts +3 -0
- package/src/extensions/Reactions/CometChatMessageReactions/style.ts +42 -0
- package/src/extensions/Reactions/ReactionsDecorator.tsx +164 -0
- package/src/extensions/Reactions/ReactionsExtension.tsx +48 -0
- package/src/extensions/Reactions/index.ts +4 -0
- package/src/extensions/Reactions/resources/index.ts +2 -0
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +135 -0
- package/src/extensions/SmartReplies/SmartRepliesExtension.tsx +52 -0
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +218 -0
- package/src/extensions/SmartReplies/index.ts +3 -0
- package/src/extensions/SmartReplies/resources/index.ts +5 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +152 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +20 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardStyle.ts +52 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +93 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/index.ts +5 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/resources/close.svg +4 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/style.ts +55 -0
- package/src/extensions/Stickers/StickerConfiguration.ts +17 -0
- package/src/extensions/Stickers/StickerStyle.ts +15 -0
- package/src/extensions/Stickers/StickersBubble.tsx +54 -0
- package/src/extensions/Stickers/StickersExtension.ts +32 -0
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +142 -0
- package/src/extensions/Stickers/index.ts +12 -0
- package/src/extensions/Stickers/resources/index.ts +5 -0
- package/src/extensions/TextModeration/TextModerationConfiguration.tsx +25 -0
- package/src/extensions/TextModeration/TextModerationExtension.tsx +50 -0
- package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +92 -0
- package/src/extensions/TextModeration/index.ts +5 -0
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +109 -0
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationExtension.tsx +45 -0
- package/src/extensions/ThumbnailGeneration/index.ts +3 -0
- package/src/extensions/index.ts +55 -0
- package/src/index.ts +561 -0
- package/src/shared/CometChatContext.tsx +39 -0
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +220 -0
- package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +121 -0
- package/src/shared/CometChatUiKit/UIKitSettings.ts +39 -0
- package/src/shared/CometChatUiKit/index.ts +9 -0
- package/src/shared/assets/images/index.ts +17 -0
- package/src/shared/base/BaseStyle.ts +40 -0
- package/src/shared/base/BorderStyle.ts +28 -0
- package/src/shared/base/FontStyle.ts +27 -0
- package/src/shared/base/ShadowStyle.ts +40 -0
- package/src/shared/base/Types.ts +21 -0
- package/src/shared/base/index.ts +28 -0
- package/src/shared/constants/UIKitConstants.ts +348 -0
- package/src/shared/events/CometChatMessageEvents/index.ts +100 -0
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +332 -0
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +350 -0
- package/src/shared/events/CometChatUIEvents.ts +18 -0
- package/src/shared/events/conversations.ts +3 -0
- package/src/shared/events/groups.ts +10 -0
- package/src/shared/events/index.ts +13 -0
- package/src/shared/events/messages.ts +11 -0
- package/src/shared/framework/.DS_Store +0 -0
- package/src/shared/framework/ChatConfigurator.ts +28 -0
- package/src/shared/framework/DataSource.ts +72 -0
- package/src/shared/framework/DataSourceDecorator.tsx +164 -0
- package/src/shared/framework/ExtensionsDataSource.tsx +20 -0
- package/src/shared/framework/MessageDataSource.tsx +621 -0
- package/src/shared/framework/index.ts +6 -0
- package/src/shared/framework/resources/index.ts +45 -0
- package/src/shared/framework/resources/messageInPrivate.png +0 -0
- package/src/shared/framework/resources/microphone.png +0 -0
- package/src/shared/framework/resources/stop_player.png +0 -0
- package/src/shared/helper/SwipeRow.js +944 -0
- package/src/shared/helper/Toast.tsx +24 -0
- package/src/shared/helper/functions.js +36 -0
- package/src/shared/helper/helperFunctions.ts +18 -0
- package/src/shared/helper/types/index.ts +26 -0
- package/src/shared/helper/useKeyboard.tsx +38 -0
- package/src/shared/index.ts +262 -0
- package/src/shared/modals/CometChatDetailsOption.ts +24 -0
- package/src/shared/modals/CometChatDetailsTemplate.ts +16 -0
- package/src/shared/modals/CometChatMessageOption.ts +14 -0
- package/src/shared/modals/CometChatMessageTemplate.ts +42 -0
- package/src/shared/modals/CometChatOptions.ts +13 -0
- package/src/shared/modals/index.ts +13 -0
- package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +180 -0
- package/src/shared/resources/CometChatLocalize/index.ts +9 -0
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +270 -0
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +270 -0
- package/src/shared/resources/CometChatSoundManager/CometChatSoundManager.js +95 -0
- package/src/shared/resources/CometChatSoundManager/index.ts +2 -0
- package/src/shared/resources/CometChatSoundManager/resources/index.js +5 -0
- package/src/shared/resources/CometChatSoundManager/sound.js +336 -0
- package/src/shared/resources/CometChatTheme/CometChatTheme.ts +28 -0
- package/src/shared/resources/CometChatTheme/Palette.ts +501 -0
- package/src/shared/resources/CometChatTheme/Typography.ts +269 -0
- package/src/shared/resources/CometChatTheme/index.ts +2 -0
- package/src/shared/resources/index.ts +12 -0
- package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +120 -0
- package/src/shared/utils/CometChatLiveReactions/LiveReactionstyles.ts +37 -0
- package/src/shared/utils/CometChatLiveReactions/index.ts +1 -0
- package/src/shared/utils/CometChatLiveReactions/resources/index.ts +4 -0
- package/src/shared/utils/CometChatLiveReactions/style.ts +8 -0
- package/src/shared/utils/CometChatMessageHelper/index.ts +55 -0
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +117 -0
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.js +30 -0
- package/src/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +42 -0
- package/src/shared/utils/CometChatMessagePreview/index.js +5 -0
- package/src/shared/utils/CometChatMessagePreview/resources/index.ts +5 -0
- package/src/shared/utils/CometChatMessagePreview/style.js +71 -0
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +353 -0
- package/src/shared/utils/DetailsUtils/resources/index.ts +16 -0
- package/src/shared/utils/MessageUtils.tsx +57 -0
- package/src/shared/utils/conversationUtils.ts +82 -0
- package/src/shared/utils/index.ts +28 -0
- package/src/shared/views/.DS_Store +0 -0
- package/src/shared/views/CometChatActionSheet/ActionItem.ts +60 -0
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +76 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +275 -0
- package/src/shared/views/CometChatActionSheet/hooks.ts +10 -0
- package/src/shared/views/CometChatActionSheet/index.ts +3 -0
- package/src/shared/views/CometChatActionSheet/resources/index.ts +7 -0
- package/src/shared/views/CometChatActionSheet/style.ts +47 -0
- package/src/shared/views/CometChatAudioBubble/.DS_Store +0 -0
- package/src/shared/views/CometChatAudioBubble/AudioBubbleStyle.ts +43 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +166 -0
- package/src/shared/views/CometChatAudioBubble/index.ts +16 -0
- package/src/shared/views/CometChatAudioBubble/resources/index.ts +7 -0
- package/src/shared/views/CometChatAudioBubble/resources/pause.png +0 -0
- package/src/shared/views/CometChatAudioBubble/style.ts +29 -0
- package/src/shared/views/CometChatAvatar/AvatarConfiguration.ts +27 -0
- package/src/shared/views/CometChatAvatar/AvatarStyle.ts +57 -0
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +122 -0
- package/src/shared/views/CometChatAvatar/index.ts +11 -0
- package/src/shared/views/CometChatAvatar/resources/index.ts +5 -0
- package/src/shared/views/CometChatAvatar/styles.ts +25 -0
- package/src/shared/views/CometChatBadge/BadgeConfiguration.ts +55 -0
- package/src/shared/views/CometChatBadge/BadgeStyle.ts +39 -0
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +70 -0
- package/src/shared/views/CometChatBadge/index.ts +10 -0
- package/src/shared/views/CometChatBadge/styles.ts +18 -0
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +173 -0
- package/src/shared/views/CometChatBottomSheet/index.ts +3 -0
- package/src/shared/views/CometChatBottomSheet/style.ts +52 -0
- package/src/shared/views/CometChatButton/CometChatButton.tsx +66 -0
- package/src/shared/views/CometChatButton/CometChatButtonStyle.ts +47 -0
- package/src/shared/views/CometChatButton/index.ts +15 -0
- package/src/shared/views/CometChatButton/style.ts +8 -0
- package/src/shared/views/CometChatCard/CometChatCard.tsx +77 -0
- package/src/shared/views/CometChatCard/CometChatCardStyle.ts +31 -0
- package/src/shared/views/CometChatCard/index.ts +9 -0
- package/src/shared/views/CometChatCard/style.ts +13 -0
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +138 -0
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +35 -0
- package/src/shared/views/CometChatConfirmDialog/index.ts +7 -0
- package/src/shared/views/CometChatConfirmDialog/style.ts +63 -0
- package/src/shared/views/CometChatDate/CometChatDate.tsx +188 -0
- package/src/shared/views/CometChatDate/DateConfiguration.ts +28 -0
- package/src/shared/views/CometChatDate/DateStyle.ts +26 -0
- package/src/shared/views/CometChatDate/index.ts +11 -0
- package/src/shared/views/CometChatDate/style.ts +8 -0
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +242 -0
- package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +17 -0
- package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +22 -0
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +26 -0
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +44 -0
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +8225 -0
- package/src/shared/views/CometChatEmojiKeyboard/index.ts +5 -0
- package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +10 -0
- package/src/shared/views/CometChatEmojiKeyboard/style.ts +64 -0
- package/src/shared/views/CometChatFileBubble/.DS_Store +0 -0
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +131 -0
- package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +58 -0
- package/src/shared/views/CometChatFileBubble/index.ts +9 -0
- package/src/shared/views/CometChatFileBubble/resources/file_upload.png +0 -0
- package/src/shared/views/CometChatFileBubble/resources/index.ts +7 -0
- package/src/shared/views/CometChatFileBubble/style.ts +48 -0
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +106 -0
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +23 -0
- package/src/shared/views/CometChatImageBubble/index.ts +9 -0
- package/src/shared/views/CometChatList/CometChatList.tsx +727 -0
- package/src/shared/views/CometChatList/Header.tsx +139 -0
- package/src/shared/views/CometChatList/index.ts +12 -0
- package/src/shared/views/CometChatList/resources/Back.png +0 -0
- package/src/shared/views/CometChatList/resources/Spinner.png +0 -0
- package/src/shared/views/CometChatList/resources/checkmark.png +0 -0
- package/src/shared/views/CometChatList/resources/index.ts +12 -0
- package/src/shared/views/CometChatList/styles.ts +103 -0
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +304 -0
- package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +20 -0
- package/src/shared/views/CometChatListItem/ListItemStyle.ts +47 -0
- package/src/shared/views/CometChatListItem/index.ts +14 -0
- package/src/shared/views/CometChatListItem/style.ts +65 -0
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +253 -0
- package/src/shared/views/CometChatMediaRecorder/MediaRecorderStyle.ts +63 -0
- package/src/shared/views/CometChatMediaRecorder/index.ts +11 -0
- package/src/shared/views/CometChatMediaRecorder/style.ts +31 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +94 -0
- package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +22 -0
- package/src/shared/views/CometChatMessageBubble/index.ts +6 -0
- package/src/shared/views/CometChatMessageBubble/style.ts +0 -0
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +184 -0
- package/src/shared/views/CometChatMessageInput/index.ts +2 -0
- package/src/shared/views/CometChatMessageInput/styles.ts +9 -0
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +72 -0
- package/src/shared/views/CometChatReceipt/MessageConfiguration.ts +53 -0
- package/src/shared/views/CometChatReceipt/ReceiptStyle.ts +3 -0
- package/src/shared/views/CometChatReceipt/index.ts +9 -0
- 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 +18 -0
- package/src/shared/views/CometChatReceipt/resources/sending.png +0 -0
- package/src/shared/views/CometChatReceipt/style.ts +9 -0
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +64 -0
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +25 -0
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorStyle.ts +37 -0
- package/src/shared/views/CometChatStatusIndicator/index.ts +12 -0
- package/src/shared/views/CometChatStatusIndicator/styles.ts +15 -0
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +125 -0
- package/src/shared/views/CometChatTextBubble/TextBubbleStyle.ts +51 -0
- package/src/shared/views/CometChatTextBubble/index.ts +11 -0
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +113 -0
- package/src/shared/views/CometChatVideoBubble/VideoBubbleStyle.ts +37 -0
- package/src/shared/views/CometChatVideoBubble/index.ts +9 -0
- package/src/shared/views/CometChatVideoBubble/resources/index.ts +5 -0
- package/src/shared/views/CometChatVideoBubble/resources/play.png +0 -0
- package/src/shared/views/CometChatVideoBubble/style.ts +10 -0
- package/src/shared/views/SwipeRow/SwipeRow.tsx +133 -0
- package/src/shared/views/SwipeRow/index.ts +3 -0
- package/src/shared/views/SwipeRow/style.ts +30 -0
- package/src/shared/views/index.ts +163 -0
- /package/{lib → src}/CometChatBannedMembers/resources/clear.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/back.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/blue-double-tick-icon.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/close.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/delete.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/error.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/grey-double-tick-icon.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/grey-tick-icon.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/new.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/password.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/private.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/rightTick.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/sending.png +0 -0
- /package/{lib → src}/CometChatConversations/resources/spineer.png +0 -0
- /package/{lib → src}/CometChatCreateGroup/resources/close.png +0 -0
- /package/{lib → src}/CometChatCreateGroup/resources/rightTick.png +0 -0
- /package/{lib → src}/CometChatCreateGroup/resources/warning.png +0 -0
- /package/{lib → src}/CometChatDetails/resources/Back.png +0 -0
- /package/{lib → src}/CometChatDetails/resources/close.png +0 -0
- /package/{lib → src}/CometChatDetails/resources/password.png +0 -0
- /package/{lib → src}/CometChatDetails/resources/private.png +0 -0
- /package/{lib → src}/CometChatDetails/resources/right-arrow.png +0 -0
- /package/{lib → src}/CometChatGroupMembers/resources/banIcon.png +0 -0
- /package/{lib → src}/CometChatGroupMembers/resources/downArrowIcon.png +0 -0
- /package/{lib → src}/CometChatGroupMembers/resources/kickIcon.png +0 -0
- /package/{lib → src}/CometChatGroupMembers/resources/rightTick.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/back.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/close.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/create.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/more.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/password.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/private.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/rightTick.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/search.png +0 -0
- /package/{lib → src}/CometChatGroups/resources/spineer.png +0 -0
- /package/{lib → src}/CometChatGroupsWithMessages/resources/write.png +0 -0
- /package/{lib → src}/CometChatJoinProtectedGroup/resources/close.png +0 -0
- /package/{lib → src}/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/circle_add.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/close.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/emoji.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/heart.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/image.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/send_message.png +0 -0
- /package/{lib → src}/CometChatMessageComposer/resources/stickers.png +0 -0
- /package/{lib → src}/CometChatMessageHeader/resources/Back.png +0 -0
- /package/{lib → src}/CometChatMessageHeader/resources/password.png +0 -0
- /package/{lib → src}/CometChatMessageHeader/resources/private.png +0 -0
- /package/{lib/calls/CometChatCallHistory → src/CometChatMessageInformation}/resources/Spineer.png +0 -0
- /package/{lib → src}/CometChatMessageList/resources/back.png +0 -0
- /package/{lib → src}/CometChatMessageList/resources/close.png +0 -0
- /package/{lib → src}/CometChatMessageList/resources/downArrowIcon.png +0 -0
- /package/{lib → src}/CometChatMessageList/resources/rightArrowIcon.png +0 -0
- /package/{lib → src}/CometChatMessageList/resources/spineer.png +0 -0
- /package/{lib → src}/CometChatMessages/resources/info.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/Back.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/close.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/more.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/password.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/private.png +0 -0
- /package/{lib → src}/CometChatThreadedMessages/resources/right-arrow.png +0 -0
- /package/{lib → src}/calls/CometChatCallBubble/resources/avatar.png +0 -0
- /package/{lib → src}/calls/CometChatCallBubble/resources/incomingaudiocall.png +0 -0
- /package/{lib → src}/calls/CometChatCallBubble/resources/incomingvideocall.png +0 -0
- /package/{lib → src}/calls/CometChatCallButtons/resources/Call.png +0 -0
- /package/{lib → src}/calls/CometChatCallButtons/resources/Video.png +0 -0
- /package/{lib → src}/calls/CometChatCallDetails/resources/CloseIcon.png +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/Back.png +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/Call.png +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/Info.png +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/Selection.png +0 -0
- /package/{lib/shared/views/CometChatList/resources/Spinner.png → src/calls/CometChatCallHistory/resources/Spineer.png} +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/Video.png +0 -0
- /package/{lib → src}/calls/CometChatCallHistory/resources/check.png +0 -0
- /package/{lib → src}/calls/CometChatIncomingCall/resources/Call.png +0 -0
- /package/{lib → src}/calls/CometChatIncomingCall/resources/close.png +0 -0
- /package/{lib → src}/calls/CometChatIncomingCall/resources/incomingaudiocall.png +0 -0
- /package/{lib → src}/calls/CometChatIncomingCall/resources/incomingvideocall.png +0 -0
- /package/{lib → src}/calls/CometChatOutgoingCall/resources/Close.png +0 -0
- /package/{lib → src}/calls/resources/Call.png +0 -0
- /package/{lib → src}/calls/resources/Video.png +0 -0
- /package/{lib → src}/extensions/CollaborativeBubble/resources/whiteboard.png +0 -0
- /package/{lib → src}/extensions/CollaborativeDocument/resources/collaborative_document.png +0 -0
- /package/{lib → src}/extensions/CollaborativeDocument/resources/collaborative_document_2x.png +0 -0
- /package/{lib → src}/extensions/CollaborativeWhiteboard/resources/collaborative_whiteboard.png +0 -0
- /package/{lib → src}/extensions/CollaborativeWhiteboard/resources/whiteboard.png +0 -0
- /package/{lib → src}/extensions/ImageModeration/resources/unsafe.png +0 -0
- /package/{lib → src}/extensions/LinkPreview/resources/defaultImage.png +0 -0
- /package/{lib → src}/extensions/MessageTranslation/resources/translate.png +0 -0
- /package/{lib → src}/extensions/Polls/resources/close.png +0 -0
- /package/{lib → src}/extensions/Polls/resources/document.png +0 -0
- /package/{lib → src}/extensions/Polls/resources/kickIcon.png +0 -0
- /package/{lib → src}/extensions/Polls/resources/rightTick.png +0 -0
- /package/{lib → src}/extensions/Polls/resources/warning.png +0 -0
- /package/{lib → src}/extensions/Reactions/resources/AddReactions.png +0 -0
- /package/{lib → src}/extensions/SmartReplies/resources/close.png +0 -0
- /package/{lib → src}/extensions/Stickers/resources/Stickers.png +0 -0
- /package/{lib/shared/views/CometChatList/resources → src/shared/assets/images}/Back.png +0 -0
- /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/blue-double-tick-icon.png +0 -0
- /package/{lib/shared/views/CometChatList/resources → src/shared/assets/images}/checkmark.png +0 -0
- /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/error.png +0 -0
- /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/grey-double-tick-icon.png +0 -0
- /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/grey-tick-icon.png +0 -0
- /package/{lib/shared/views/CometChatReceipt/resources → src/shared/assets/images}/sending.png +0 -0
- /package/{lib → src}/shared/framework/resources/audio-file.png +0 -0
- /package/{lib → src}/shared/framework/resources/circle_add.png +0 -0
- /package/{lib → src}/shared/framework/resources/copy.png +0 -0
- /package/{lib → src}/shared/framework/resources/delete.png +0 -0
- /package/{lib → src}/shared/framework/resources/edit.png +0 -0
- /package/{lib → src}/shared/framework/resources/emoji.png +0 -0
- /package/{lib → src}/shared/framework/resources/file_upload.png +0 -0
- /package/{lib → src}/shared/framework/resources/forward.png +0 -0
- /package/{lib → src}/shared/framework/resources/heart.png +0 -0
- /package/{lib → src}/shared/framework/resources/image.png +0 -0
- /package/{lib → src}/shared/framework/resources/info.png +0 -0
- /package/{lib → src}/shared/framework/resources/location.png +0 -0
- /package/{lib/shared/views/CometChatAudioBubble → src/shared/framework}/resources/pause.png +0 -0
- /package/{lib/shared/views/CometChatAudioBubble → src/shared/framework}/resources/play.png +0 -0
- /package/{lib → src}/shared/framework/resources/reply.png +0 -0
- /package/{lib → src}/shared/framework/resources/send_message.png +0 -0
- /package/{lib → src}/shared/framework/resources/share.png +0 -0
- /package/{lib → src}/shared/framework/resources/thread.png +0 -0
- /package/{lib → src}/shared/framework/resources/video_upload.png +0 -0
- /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingcall.wav +0 -0
- /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingmessage.wav +0 -0
- /package/{lib → src}/shared/resources/CometChatSoundManager/resources/incomingothermessage.wav +0 -0
- /package/{lib → src}/shared/resources/CometChatSoundManager/resources/outgoingcall.wav +0 -0
- /package/{lib → src}/shared/resources/CometChatSoundManager/resources/outgoingmessage.wav +0 -0
- /package/{lib → src}/shared/utils/CometChatLiveReactions/resources/heart.png +0 -0
- /package/{lib → src}/shared/utils/CometChatMessagePreview/resources/close.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/Back.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/banIcon.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/close.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/kickIcon.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/password.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/private.png +0 -0
- /package/{lib → src}/shared/utils/DetailsUtils/resources/right-arrow.png +0 -0
- /package/{lib → src}/shared/views/CometChatActionSheet/resources/grid.png +0 -0
- /package/{lib → src}/shared/views/CometChatActionSheet/resources/list.png +0 -0
- /package/{lib/shared/views/CometChatVideoBubble → src/shared/views/CometChatAudioBubble}/resources/play.png +0 -0
- /package/{lib → src}/shared/views/CometChatAvatar/resources/default.jpg +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/activity.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/animals.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/flags.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/food.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/objects.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/smileys.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/symbols.png +0 -0
- /package/{lib → src}/shared/views/CometChatEmojiKeyboard/resources/travel.png +0 -0
- /package/{lib → src}/shared/views/CometChatFileBubble/resources/download.png +0 -0
- /package/{lib → src}/shared/views/CometChatList/resources/Search.png +0 -0
- /package/{lib → src}/shared/views/CometChatList/resources/check.png +0 -0
|
@@ -0,0 +1,944 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import React, { Component } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import {
|
|
6
|
+
Dimensions,
|
|
7
|
+
Animated,
|
|
8
|
+
PanResponder,
|
|
9
|
+
StyleSheet,
|
|
10
|
+
TouchableOpacity,
|
|
11
|
+
View,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
|
|
14
|
+
const DEFAULT_PREVIEW_OPEN_DELAY = 700;
|
|
15
|
+
const PREVIEW_CLOSE_DELAY = 300;
|
|
16
|
+
const MAX_VELOCITY_CONTRIBUTION = 5;
|
|
17
|
+
const SCROLL_LOCK_MILLISECONDS = 300;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Row that is generally used in a SwipeListView.
|
|
21
|
+
* If you are rendering a SwipeRow explicitly you must pass the SwipeRow exactly two children.
|
|
22
|
+
* The first will be rendered behind the second.
|
|
23
|
+
* e.g.
|
|
24
|
+
<SwipeRow>
|
|
25
|
+
<View style={hiddenRowStyle} />
|
|
26
|
+
<View style={visibleRowStyle} />
|
|
27
|
+
</SwipeRow>
|
|
28
|
+
*/
|
|
29
|
+
class SwipeRow extends Component {
|
|
30
|
+
constructor(props) {
|
|
31
|
+
super(props);
|
|
32
|
+
this.isOpen = false;
|
|
33
|
+
this.leftActionActivated = false;
|
|
34
|
+
this.rightActionActivated = false;
|
|
35
|
+
this.previousTrackedTranslateX = 0;
|
|
36
|
+
this.currentTranslateX = 0;
|
|
37
|
+
this.previousTrackedDirection = null;
|
|
38
|
+
this.horizontalSwipeGestureBegan = false;
|
|
39
|
+
this.swipeInitialX = null;
|
|
40
|
+
this.parentScrollEnabled = true;
|
|
41
|
+
this.ranPreview = false;
|
|
42
|
+
this._ensureScrollEnabledTimer = null;
|
|
43
|
+
this.isForceClosing = false;
|
|
44
|
+
this.state = {
|
|
45
|
+
leftActionActivated: false,
|
|
46
|
+
rightActionActivated: false,
|
|
47
|
+
leftActionState: this.props.initialLeftActionState || false,
|
|
48
|
+
rightActionState: this.props.initialRightActionState || false,
|
|
49
|
+
previewRepeatInterval: null,
|
|
50
|
+
timeBetweenPreviewRepeats: null,
|
|
51
|
+
dimensionsSet: false,
|
|
52
|
+
hiddenHeight: this.props.disableHiddenLayoutCalculation
|
|
53
|
+
? '100%'
|
|
54
|
+
: 0,
|
|
55
|
+
hiddenWidth: this.props.disableHiddenLayoutCalculation ? '100%' : 0,
|
|
56
|
+
};
|
|
57
|
+
this._translateX = new Animated.Value(0);
|
|
58
|
+
|
|
59
|
+
this._panResponder = PanResponder.create({
|
|
60
|
+
onMoveShouldSetPanResponder: (e, gs) =>
|
|
61
|
+
this.handleOnMoveShouldSetPanResponder(e, gs),
|
|
62
|
+
onPanResponderMove: (e, gs) => this.handlePanResponderMove(e, gs),
|
|
63
|
+
onPanResponderRelease: (e, gs) =>
|
|
64
|
+
this.handlePanResponderRelease(e, gs),
|
|
65
|
+
onPanResponderTerminate: (e, gs) =>
|
|
66
|
+
this.handlePanResponderEnd(e, gs),
|
|
67
|
+
onShouldBlockNativeResponder: () => false,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this._translateX.addListener(({ value }) => {
|
|
71
|
+
this.currentTranslateX = value;
|
|
72
|
+
if (this.props.onSwipeValueChange) {
|
|
73
|
+
let direction = this.previousTrackedDirection;
|
|
74
|
+
if (
|
|
75
|
+
value !== this.previousTrackedTranslateX &&
|
|
76
|
+
Math.abs(value - this.previousTrackedTranslateX) > 0.5
|
|
77
|
+
) {
|
|
78
|
+
direction =
|
|
79
|
+
value > this.previousTrackedTranslateX
|
|
80
|
+
? 'right'
|
|
81
|
+
: 'left';
|
|
82
|
+
}
|
|
83
|
+
this.props.onSwipeValueChange &&
|
|
84
|
+
this.props.onSwipeValueChange({
|
|
85
|
+
isOpen: this.isOpen,
|
|
86
|
+
direction,
|
|
87
|
+
value,
|
|
88
|
+
key: this.props.swipeKey,
|
|
89
|
+
});
|
|
90
|
+
this.previousTrackedTranslateX = value;
|
|
91
|
+
this.previousTrackedDirection = direction;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
if (
|
|
96
|
+
this.props.forceCloseToRightThreshold &&
|
|
97
|
+
this.props.forceCloseToRightThreshold > 0
|
|
98
|
+
) {
|
|
99
|
+
this._translateX.addListener(({ value }) => {
|
|
100
|
+
if (
|
|
101
|
+
!this.isForceClosing &&
|
|
102
|
+
Dimensions.get('window').width + value <
|
|
103
|
+
this.props.forceCloseToRightThreshold
|
|
104
|
+
) {
|
|
105
|
+
this.isForceClosing = true;
|
|
106
|
+
this.forceCloseRow('right');
|
|
107
|
+
if (this.props.onForceCloseToRight) {
|
|
108
|
+
this.props.onForceCloseToRight();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (
|
|
115
|
+
this.props.forceCloseToLeftThreshold &&
|
|
116
|
+
this.props.forceCloseToRightThreshold > 0
|
|
117
|
+
) {
|
|
118
|
+
this._translateX.addListener(({ value }) => {
|
|
119
|
+
if (
|
|
120
|
+
!this.isForceClosing &&
|
|
121
|
+
Dimensions.get('window').width - value <
|
|
122
|
+
this.props.forceCloseToLeftThreshold
|
|
123
|
+
) {
|
|
124
|
+
this.isForceClosing = true;
|
|
125
|
+
this.forceCloseRow('left');
|
|
126
|
+
if (this.props.onForceCloseToLeft) {
|
|
127
|
+
this.props.onForceCloseToLeft();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (
|
|
134
|
+
this.props.onLeftActionStatusChange &&
|
|
135
|
+
this.props.leftActivationValue &&
|
|
136
|
+
this.props.leftActivationValue > 0
|
|
137
|
+
) {
|
|
138
|
+
this._translateX.addListener(({ value }) => {
|
|
139
|
+
const absValue = Math.abs(value);
|
|
140
|
+
const isActivated = absValue > this.props.leftActivationValue;
|
|
141
|
+
if (this.leftActionActivated !== isActivated && value > 0) {
|
|
142
|
+
this.props.onLeftActionStatusChange({
|
|
143
|
+
isActivated,
|
|
144
|
+
value,
|
|
145
|
+
key: this.props.swipeKey,
|
|
146
|
+
});
|
|
147
|
+
this.leftActionActivated = isActivated;
|
|
148
|
+
this.setState({
|
|
149
|
+
leftActionActivated: isActivated,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (
|
|
156
|
+
this.props.onRightActionStatusChange &&
|
|
157
|
+
this.props.rightActivationValue &&
|
|
158
|
+
this.props.rightActivationValue < 0
|
|
159
|
+
) {
|
|
160
|
+
this._translateX.addListener(({ value }) => {
|
|
161
|
+
const absValue = Math.abs(value);
|
|
162
|
+
const isActivated =
|
|
163
|
+
absValue > Math.abs(this.props.rightActivationValue);
|
|
164
|
+
if (this.rightActionActivated !== isActivated && value < 0) {
|
|
165
|
+
this.props.onRightActionStatusChange({
|
|
166
|
+
isActivated,
|
|
167
|
+
value,
|
|
168
|
+
key: this.props.swipeKey,
|
|
169
|
+
});
|
|
170
|
+
this.rightActionActivated = isActivated;
|
|
171
|
+
this.setState({
|
|
172
|
+
rightActionActivated: isActivated,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
componentWillUnmount() {
|
|
180
|
+
clearTimeout(this._ensureScrollEnabledTimer);
|
|
181
|
+
this._translateX.removeAllListeners();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
shouldComponentUpdate(nextProps, nextState) {
|
|
185
|
+
if (
|
|
186
|
+
this.state.hiddenHeight !== nextState.hiddenHeight ||
|
|
187
|
+
this.state.hiddenWidth !== nextState.hiddenWidth ||
|
|
188
|
+
this.state.leftActionActivated !== nextState.leftActionActivated ||
|
|
189
|
+
this.state.rightActionActivated !==
|
|
190
|
+
nextState.rightActionActivated ||
|
|
191
|
+
this.state.leftActionState !== nextState.leftActionState ||
|
|
192
|
+
this.state.rightActionState !== nextState.rightActionState ||
|
|
193
|
+
!this.props.shouldItemUpdate ||
|
|
194
|
+
(this.props.shouldItemUpdate &&
|
|
195
|
+
this.props.shouldItemUpdate(this.props.item, nextProps.item))
|
|
196
|
+
) {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
static getDerivedStateFromProps(nextProps, prevState) {
|
|
204
|
+
if (!nextProps.previewRepeat) {
|
|
205
|
+
clearInterval(prevState.previewRepeatInterval);
|
|
206
|
+
prevState.previewRepeatInterval = null;
|
|
207
|
+
}
|
|
208
|
+
prevState.timeBetweenPreviewRepeats =
|
|
209
|
+
nextProps.previewDuration * 2 +
|
|
210
|
+
nextProps.previewOpenDelay +
|
|
211
|
+
PREVIEW_CLOSE_DELAY +
|
|
212
|
+
nextProps.previewRepeatDelay;
|
|
213
|
+
return prevState;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
getPreviewAnimation(toValue, delay) {
|
|
217
|
+
return Animated.timing(this._translateX, {
|
|
218
|
+
duration: this.props.previewDuration,
|
|
219
|
+
toValue,
|
|
220
|
+
delay,
|
|
221
|
+
useNativeDriver: this.props.useNativeDriver,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
onContentLayout(e) {
|
|
226
|
+
this.setState({
|
|
227
|
+
dimensionsSet: !this.props.recalculateHiddenLayout,
|
|
228
|
+
...(!this.props.disableHiddenLayoutCalculation
|
|
229
|
+
? {
|
|
230
|
+
hiddenHeight: e.nativeEvent.layout.height,
|
|
231
|
+
hiddenWidth: e.nativeEvent.layout.width,
|
|
232
|
+
}
|
|
233
|
+
: {}),
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
if (this.props.preview && !this.ranPreview) {
|
|
237
|
+
this.ranPreview = true;
|
|
238
|
+
this.doFullAnimation();
|
|
239
|
+
if (this.props.previewRepeat) {
|
|
240
|
+
this.setState({
|
|
241
|
+
previewRepeatInterval: setInterval(() => {
|
|
242
|
+
this.doFullAnimation();
|
|
243
|
+
}, this.state.timeBetweenPreviewRepeats),
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
doFullAnimation() {
|
|
250
|
+
const previewOpenValue =
|
|
251
|
+
this.props.previewOpenValue || this.props.rightOpenValue * 0.5;
|
|
252
|
+
return this.getPreviewAnimation(
|
|
253
|
+
previewOpenValue,
|
|
254
|
+
this.props.previewOpenDelay
|
|
255
|
+
).start(() => {
|
|
256
|
+
this.getPreviewAnimation(0, PREVIEW_CLOSE_DELAY).start(() => {
|
|
257
|
+
this.props.onPreviewEnd && this.props.onPreviewEnd();
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
onRowPress() {
|
|
263
|
+
if (this.props.onRowPress) {
|
|
264
|
+
this.props.onRowPress();
|
|
265
|
+
} else {
|
|
266
|
+
if (this.props.closeOnRowPress) {
|
|
267
|
+
this.closeRow();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
handleOnMoveShouldSetPanResponder(e, gs) {
|
|
273
|
+
const { dx } = gs;
|
|
274
|
+
return Math.abs(dx) > this.props.directionalDistanceChangeThreshold;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
handlePanResponderMove(e, gestureState) {
|
|
278
|
+
/* If the view is force closing, then ignore Moves. Return */
|
|
279
|
+
if (this.isForceClosing) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Else, do normal job */
|
|
284
|
+
const { dx, dy } = gestureState;
|
|
285
|
+
const absDx = Math.abs(dx);
|
|
286
|
+
const absDy = Math.abs(dy);
|
|
287
|
+
|
|
288
|
+
// this check may not be necessary because we don't capture the move until we pass the threshold
|
|
289
|
+
// just being extra safe here
|
|
290
|
+
if (
|
|
291
|
+
absDx > this.props.directionalDistanceChangeThreshold ||
|
|
292
|
+
absDy > this.props.directionalDistanceChangeThreshold
|
|
293
|
+
) {
|
|
294
|
+
// we have enough to determine direction
|
|
295
|
+
if (absDy > absDx && !this.horizontalSwipeGestureBegan) {
|
|
296
|
+
// user is moving vertically, do nothing, listView will handle
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// user is moving horizontally
|
|
301
|
+
if (this.parentScrollEnabled) {
|
|
302
|
+
// disable scrolling on the listView parent
|
|
303
|
+
this.parentScrollEnabled = false;
|
|
304
|
+
this.props.setScrollEnabled &&
|
|
305
|
+
this.props.setScrollEnabled(false);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (this.swipeInitialX === null) {
|
|
309
|
+
// set tranlateX value when user started swiping
|
|
310
|
+
this.swipeInitialX = this.currentTranslateX;
|
|
311
|
+
}
|
|
312
|
+
if (!this.horizontalSwipeGestureBegan) {
|
|
313
|
+
this.horizontalSwipeGestureBegan = true;
|
|
314
|
+
this.props.swipeGestureBegan && this.props.swipeGestureBegan();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
let newDX = this.swipeInitialX + dx;
|
|
318
|
+
if (this.props.disableLeftSwipe && newDX < 0) {
|
|
319
|
+
newDX = 0;
|
|
320
|
+
}
|
|
321
|
+
if (this.props.disableRightSwipe && newDX > 0) {
|
|
322
|
+
newDX = 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (this.props.stopLeftSwipe && newDX > this.props.stopLeftSwipe) {
|
|
326
|
+
newDX = this.props.stopLeftSwipe;
|
|
327
|
+
}
|
|
328
|
+
if (
|
|
329
|
+
this.props.stopRightSwipe &&
|
|
330
|
+
newDX < this.props.stopRightSwipe
|
|
331
|
+
) {
|
|
332
|
+
newDX = this.props.stopRightSwipe;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
this._translateX.setValue(newDX);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
ensureScrollEnabled = () => {
|
|
340
|
+
if (!this.parentScrollEnabled) {
|
|
341
|
+
this.parentScrollEnabled = true;
|
|
342
|
+
this.props.setScrollEnabled && this.props.setScrollEnabled(true);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
handlePanResponderRelease(e, gestureState) {
|
|
347
|
+
this.props.swipeGestureEnded &&
|
|
348
|
+
this.props.swipeGestureEnded(this.props.swipeKey, {
|
|
349
|
+
translateX: this.currentTranslateX,
|
|
350
|
+
direction: this.previousTrackedDirection,
|
|
351
|
+
event: e,
|
|
352
|
+
gestureState,
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
// If preventDefault() called on the event, do not handle responder end.
|
|
356
|
+
if (!e.defaultPrevented) {
|
|
357
|
+
this.handlePanResponderEnd(e, gestureState);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
handlePanResponderEnd(e, gestureState) {
|
|
362
|
+
/* PanEnd will reset the force-closing state when it's true. */
|
|
363
|
+
if (this.isForceClosing) {
|
|
364
|
+
setTimeout(() => {
|
|
365
|
+
this.isForceClosing = false;
|
|
366
|
+
}, 500); // 500 is the default Animated.spring's duration used in manuallySwipeRow
|
|
367
|
+
}
|
|
368
|
+
// decide how much the velocity will affect the final position that the list item settles in.
|
|
369
|
+
const swipeToOpenVelocityContribution = this.props
|
|
370
|
+
.swipeToOpenVelocityContribution;
|
|
371
|
+
const possibleExtraPixels =
|
|
372
|
+
this.props.rightOpenValue * swipeToOpenVelocityContribution;
|
|
373
|
+
const clampedVelocity = Math.min(
|
|
374
|
+
gestureState.vx,
|
|
375
|
+
MAX_VELOCITY_CONTRIBUTION
|
|
376
|
+
);
|
|
377
|
+
const projectedExtraPixels =
|
|
378
|
+
possibleExtraPixels * (clampedVelocity / MAX_VELOCITY_CONTRIBUTION);
|
|
379
|
+
|
|
380
|
+
// re-enable scrolling on listView parent
|
|
381
|
+
this._ensureScrollEnabledTimer = setTimeout(
|
|
382
|
+
this.ensureScrollEnabled,
|
|
383
|
+
SCROLL_LOCK_MILLISECONDS
|
|
384
|
+
);
|
|
385
|
+
|
|
386
|
+
// finish up the animation
|
|
387
|
+
if (this.currentTranslateX >= 0) {
|
|
388
|
+
// trying to swipe right
|
|
389
|
+
// if (this.props.disableRightSwipe) {
|
|
390
|
+
// return;
|
|
391
|
+
// }
|
|
392
|
+
|
|
393
|
+
this.handleRightSwipe(projectedExtraPixels);
|
|
394
|
+
} else {
|
|
395
|
+
// trying to swipe left
|
|
396
|
+
if (this.props.disableLeftSwipe) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
this.handleLeftSwipe(projectedExtraPixels);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
handleRightSwipe(projectedExtraPixels) {
|
|
405
|
+
let toValue = 0;
|
|
406
|
+
let actionSide;
|
|
407
|
+
const leftActionValue = this.props.leftActionValue || 0;
|
|
408
|
+
if (this.swipeInitialX < this.currentTranslateX) {
|
|
409
|
+
if (
|
|
410
|
+
this.currentTranslateX - projectedExtraPixels >
|
|
411
|
+
this.props.leftOpenValue * (this.props.swipeToOpenPercent / 100)
|
|
412
|
+
) {
|
|
413
|
+
// we're more than halfway
|
|
414
|
+
toValue = this.isForceClosing ? 0 : this.props.leftOpenValue;
|
|
415
|
+
}
|
|
416
|
+
if (
|
|
417
|
+
this.currentTranslateX - projectedExtraPixels >
|
|
418
|
+
this.props.leftActivationValue
|
|
419
|
+
) {
|
|
420
|
+
// we've passed the threshold to trigger the leftActionValue
|
|
421
|
+
toValue = this.isForceClosing ? 0 : leftActionValue;
|
|
422
|
+
actionSide = 'left';
|
|
423
|
+
}
|
|
424
|
+
} else {
|
|
425
|
+
if (
|
|
426
|
+
this.currentTranslateX - projectedExtraPixels >
|
|
427
|
+
this.props.leftOpenValue *
|
|
428
|
+
(1 - this.props.swipeToClosePercent / 100)
|
|
429
|
+
) {
|
|
430
|
+
toValue = this.isForceClosing ? 0 : this.props.leftOpenValue;
|
|
431
|
+
}
|
|
432
|
+
if (
|
|
433
|
+
this.currentTranslateX - projectedExtraPixels >
|
|
434
|
+
this.props.leftActivationValue
|
|
435
|
+
) {
|
|
436
|
+
toValue = this.isForceClosing ? 0 : leftActionValue;
|
|
437
|
+
actionSide = 'left';
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
const action = this.determineAction(actionSide);
|
|
442
|
+
this.manuallySwipeRow(toValue, action);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
handleLeftSwipe(projectedExtraPixels) {
|
|
446
|
+
let toValue = 0;
|
|
447
|
+
let actionSide;
|
|
448
|
+
const rightActionValue = this.props.rightActionValue || 0;
|
|
449
|
+
if (this.swipeInitialX > this.currentTranslateX) {
|
|
450
|
+
if (
|
|
451
|
+
this.currentTranslateX - projectedExtraPixels <
|
|
452
|
+
this.props.rightOpenValue *
|
|
453
|
+
(this.props.swipeToOpenPercent / 100)
|
|
454
|
+
) {
|
|
455
|
+
// we're more than halfway
|
|
456
|
+
toValue = this.isForceClosing ? 0 : this.props.rightOpenValue;
|
|
457
|
+
}
|
|
458
|
+
if (
|
|
459
|
+
this.currentTranslateX - projectedExtraPixels <
|
|
460
|
+
this.props.rightActivationValue
|
|
461
|
+
) {
|
|
462
|
+
// we've passed the threshold to trigger the rightActionValue
|
|
463
|
+
toValue = this.isForceClosing ? 0 : rightActionValue;
|
|
464
|
+
actionSide = 'right';
|
|
465
|
+
}
|
|
466
|
+
} else {
|
|
467
|
+
if (
|
|
468
|
+
this.currentTranslateX - projectedExtraPixels <
|
|
469
|
+
this.props.rightOpenValue
|
|
470
|
+
) {
|
|
471
|
+
toValue = this.isForceClosing ? 0 : this.props.rightOpenValue;
|
|
472
|
+
}
|
|
473
|
+
if (
|
|
474
|
+
this.currentTranslateX - projectedExtraPixels <
|
|
475
|
+
this.props.rightActivationValue *
|
|
476
|
+
(1 - this.props.swipeToClosePercent / 100)
|
|
477
|
+
) {
|
|
478
|
+
toValue = this.isForceClosing ? 0 : rightActionValue;
|
|
479
|
+
actionSide = 'right';
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
const action = this.determineAction(actionSide);
|
|
483
|
+
this.manuallySwipeRow(toValue, action);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
determineAction(actionSide) {
|
|
487
|
+
if (actionSide === 'right') {
|
|
488
|
+
return () => {
|
|
489
|
+
this.props.onRightAction && this.props.onRightAction();
|
|
490
|
+
this.setState({
|
|
491
|
+
rightActionState: !this.state.rightActionState,
|
|
492
|
+
});
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
if (actionSide === 'left') {
|
|
496
|
+
return () => {
|
|
497
|
+
this.props.onLeftAction && this.props.onLeftAction();
|
|
498
|
+
this.setState({
|
|
499
|
+
leftActionState: !this.state.leftActionState,
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/*
|
|
506
|
+
* This method is called by SwipeListView
|
|
507
|
+
*/
|
|
508
|
+
closeRow() {
|
|
509
|
+
this.manuallySwipeRow(0);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Force close the row toward the end of the given direction.
|
|
514
|
+
* @param {String} direction The direction to force close.
|
|
515
|
+
*/
|
|
516
|
+
forceCloseRow(direction) {
|
|
517
|
+
this.manuallySwipeRow(0, () => {
|
|
518
|
+
if (direction === 'right' && this.props.onForceCloseToRightEnd) {
|
|
519
|
+
this.props.onForceCloseToRightEnd();
|
|
520
|
+
} else if (
|
|
521
|
+
direction === 'left' &&
|
|
522
|
+
this.props.onForceCloseToLeftEnd
|
|
523
|
+
) {
|
|
524
|
+
this.props.onForceCloseToLeftEnd();
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
closeRowWithoutAnimation() {
|
|
530
|
+
this._translateX.setValue(0);
|
|
531
|
+
|
|
532
|
+
this.ensureScrollEnabled();
|
|
533
|
+
this.isOpen = false;
|
|
534
|
+
this.props.onRowDidClose && this.props.onRowDidClose();
|
|
535
|
+
|
|
536
|
+
this.props.onRowClose && this.props.onRowClose();
|
|
537
|
+
|
|
538
|
+
this.swipeInitialX = null;
|
|
539
|
+
this.horizontalSwipeGestureBegan = false;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
manuallySwipeRow(toValue, onAnimationEnd) {
|
|
543
|
+
Animated.spring(this._translateX, {
|
|
544
|
+
toValue,
|
|
545
|
+
friction: this.props.friction,
|
|
546
|
+
tension: this.props.tension,
|
|
547
|
+
restSpeedThreshold: this.props.restSpeedThreshold,
|
|
548
|
+
restDisplacementThreshold: this.props.restDisplacementThreshold,
|
|
549
|
+
useNativeDriver: this.props.useNativeDriver,
|
|
550
|
+
}).start(() => {
|
|
551
|
+
this.ensureScrollEnabled();
|
|
552
|
+
if (toValue === 0) {
|
|
553
|
+
this.isOpen = false;
|
|
554
|
+
this.props.onRowDidClose && this.props.onRowDidClose();
|
|
555
|
+
} else {
|
|
556
|
+
this.isOpen = true;
|
|
557
|
+
this.props.onRowDidOpen && this.props.onRowDidOpen(toValue);
|
|
558
|
+
}
|
|
559
|
+
if (onAnimationEnd) {
|
|
560
|
+
onAnimationEnd();
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
if (toValue === 0) {
|
|
565
|
+
this.props.onRowClose && this.props.onRowClose();
|
|
566
|
+
} else {
|
|
567
|
+
this.props.onRowOpen && this.props.onRowOpen(toValue);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// reset everything
|
|
571
|
+
this.swipeInitialX = null;
|
|
572
|
+
this.horizontalSwipeGestureBegan = false;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
combinedOnPress = (...args) => {
|
|
576
|
+
const onPress = this.props.children[1].props.onPress;
|
|
577
|
+
this.onRowPress();
|
|
578
|
+
onPress && onPress(...args);
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
renderVisibleContent() {
|
|
582
|
+
if (!this.props.closeOnRowPress) {
|
|
583
|
+
return React.cloneElement(this.props.children[1], {
|
|
584
|
+
...this.props.children[1].props,
|
|
585
|
+
leftActionActivated: this.state.leftActionActivated,
|
|
586
|
+
rightActionActivated: this.state.rightActionActivated,
|
|
587
|
+
leftActionState: this.state.leftActionState,
|
|
588
|
+
rightActionState: this.state.rightActionState,
|
|
589
|
+
swipeAnimatedValue: this._translateX,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
// handle touchables
|
|
594
|
+
const onPress = this.props.children[1].props.onPress;
|
|
595
|
+
|
|
596
|
+
if (onPress) {
|
|
597
|
+
return React.cloneElement(this.props.children[1], {
|
|
598
|
+
...this.props.children[1].props,
|
|
599
|
+
onPress: this.combinedOnPress,
|
|
600
|
+
leftActionActivated: this.state.leftActionActivated,
|
|
601
|
+
rightActionActivated: this.state.rightActionActivated,
|
|
602
|
+
leftActionState: this.state.leftActionState,
|
|
603
|
+
rightActionState: this.state.rightActionState,
|
|
604
|
+
swipeAnimatedValue: this._translateX,
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
return (
|
|
609
|
+
<TouchableOpacity
|
|
610
|
+
activeOpacity={1}
|
|
611
|
+
onPress={this.combinedOnPress}
|
|
612
|
+
accessible={false}
|
|
613
|
+
>
|
|
614
|
+
{React.cloneElement(this.props.children[1], {
|
|
615
|
+
...this.props.children[1].props,
|
|
616
|
+
leftActionActivated: this.state.leftActionActivated,
|
|
617
|
+
rightActionActivated: this.state.rightActionActivated,
|
|
618
|
+
leftActionState: this.state.leftActionState,
|
|
619
|
+
rightActionState: this.state.rightActionState,
|
|
620
|
+
swipeAnimatedValue: this._translateX,
|
|
621
|
+
})}
|
|
622
|
+
</TouchableOpacity>
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
renderRowContent() {
|
|
627
|
+
// We do this annoying if statement for performance.
|
|
628
|
+
// We don't want the onLayout func to run after it runs once.
|
|
629
|
+
if (this.state.dimensionsSet) {
|
|
630
|
+
return (
|
|
631
|
+
<Animated.View
|
|
632
|
+
manipulationModes={['translateX']}
|
|
633
|
+
{...this._panResponder.panHandlers}
|
|
634
|
+
style={{
|
|
635
|
+
zIndex: 2,
|
|
636
|
+
transform: [{ translateX: this._translateX }],
|
|
637
|
+
}}
|
|
638
|
+
>
|
|
639
|
+
{this.renderVisibleContent()}
|
|
640
|
+
</Animated.View>
|
|
641
|
+
);
|
|
642
|
+
} else {
|
|
643
|
+
return (
|
|
644
|
+
<Animated.View
|
|
645
|
+
manipulationModes={['translateX']}
|
|
646
|
+
{...this._panResponder.panHandlers}
|
|
647
|
+
onLayout={e => this.onContentLayout(e)}
|
|
648
|
+
style={{
|
|
649
|
+
zIndex: 2,
|
|
650
|
+
transform: [{ translateX: this._translateX }],
|
|
651
|
+
}}
|
|
652
|
+
>
|
|
653
|
+
{this.renderVisibleContent()}
|
|
654
|
+
</Animated.View>
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
render() {
|
|
660
|
+
return (
|
|
661
|
+
<View
|
|
662
|
+
style={this.props.style ? this.props.style : styles.container}
|
|
663
|
+
>
|
|
664
|
+
<View
|
|
665
|
+
style={[
|
|
666
|
+
styles.hidden,
|
|
667
|
+
{
|
|
668
|
+
height: this.state.hiddenHeight,
|
|
669
|
+
width: this.state.hiddenWidth,
|
|
670
|
+
},
|
|
671
|
+
]}
|
|
672
|
+
>
|
|
673
|
+
{React.cloneElement(this.props.children[0], {
|
|
674
|
+
...this.props.children[0].props,
|
|
675
|
+
leftActionActivated: this.state.leftActionActivated,
|
|
676
|
+
rightActionActivated: this.state.rightActionActivated,
|
|
677
|
+
leftActionState: this.state.leftActionState,
|
|
678
|
+
rightActionState: this.state.rightActionState,
|
|
679
|
+
swipeAnimatedValue: this._translateX,
|
|
680
|
+
})}
|
|
681
|
+
</View>
|
|
682
|
+
{this.renderRowContent()}
|
|
683
|
+
</View>
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
const styles = StyleSheet.create({
|
|
689
|
+
container: {
|
|
690
|
+
// As of RN 0.29 flex: 1 is causing all rows to be the same height
|
|
691
|
+
// flex: 1
|
|
692
|
+
},
|
|
693
|
+
hidden: {
|
|
694
|
+
zIndex: 1,
|
|
695
|
+
bottom: 0,
|
|
696
|
+
left: 0,
|
|
697
|
+
overflow: 'hidden',
|
|
698
|
+
position: 'absolute',
|
|
699
|
+
right: 0,
|
|
700
|
+
top: 0,
|
|
701
|
+
},
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
SwipeRow.propTypes = {
|
|
705
|
+
/**
|
|
706
|
+
* Used by the SwipeListView to close rows on scroll events.
|
|
707
|
+
* You shouldn't need to use this prop explicitly.
|
|
708
|
+
*/
|
|
709
|
+
setScrollEnabled: PropTypes.func,
|
|
710
|
+
/**
|
|
711
|
+
* Called when it has been detected that a row should be swiped open.
|
|
712
|
+
*/
|
|
713
|
+
swipeGestureBegan: PropTypes.func,
|
|
714
|
+
/**
|
|
715
|
+
* Called when user has ended their swipe gesture
|
|
716
|
+
*/
|
|
717
|
+
swipeGestureEnded: PropTypes.func,
|
|
718
|
+
/**
|
|
719
|
+
* Called when a swipe row is animating open. Used by the SwipeListView
|
|
720
|
+
* to keep references to open rows.
|
|
721
|
+
*/
|
|
722
|
+
onRowOpen: PropTypes.func,
|
|
723
|
+
/**
|
|
724
|
+
* Called when a swipe row has animated open.
|
|
725
|
+
*/
|
|
726
|
+
onRowDidOpen: PropTypes.func,
|
|
727
|
+
/**
|
|
728
|
+
* TranslateX value for opening the row to the left (positive number)
|
|
729
|
+
*/
|
|
730
|
+
leftOpenValue: PropTypes.number,
|
|
731
|
+
/**
|
|
732
|
+
* TranslateX value for opening the row to the right (negative number)
|
|
733
|
+
*/
|
|
734
|
+
rightOpenValue: PropTypes.number,
|
|
735
|
+
/**
|
|
736
|
+
* TranslateX value for firing onLeftActionStatusChange (positive number)
|
|
737
|
+
*/
|
|
738
|
+
leftActivationValue: PropTypes.number,
|
|
739
|
+
/**
|
|
740
|
+
* TranslateX value for firing onRightActionStatusChange (negative number)
|
|
741
|
+
*/
|
|
742
|
+
rightActivationValue: PropTypes.number,
|
|
743
|
+
/**
|
|
744
|
+
* TranslateX value for left action to which the row will be shifted after gesture release
|
|
745
|
+
*/
|
|
746
|
+
leftActionValue: PropTypes.number,
|
|
747
|
+
/**
|
|
748
|
+
* TranslateX value for right action to which the row will be shifted after gesture release
|
|
749
|
+
*/
|
|
750
|
+
rightActionValue: PropTypes.number,
|
|
751
|
+
/**
|
|
752
|
+
* Initial value for left action state (default is false)
|
|
753
|
+
*/
|
|
754
|
+
initialLeftActionState: PropTypes.bool,
|
|
755
|
+
/**
|
|
756
|
+
* Initial value for right action state (default is false)
|
|
757
|
+
*/
|
|
758
|
+
initialRightActionState: PropTypes.bool,
|
|
759
|
+
/**
|
|
760
|
+
* TranslateX value for stop the row to the left (positive number)
|
|
761
|
+
*/
|
|
762
|
+
stopLeftSwipe: PropTypes.number,
|
|
763
|
+
/**
|
|
764
|
+
* TranslateX value for stop the row to the right (negative number)
|
|
765
|
+
*/
|
|
766
|
+
stopRightSwipe: PropTypes.number,
|
|
767
|
+
/**
|
|
768
|
+
* Friction for the open / close animation
|
|
769
|
+
*/
|
|
770
|
+
friction: PropTypes.number,
|
|
771
|
+
/**
|
|
772
|
+
* Tension for the open / close animation
|
|
773
|
+
*/
|
|
774
|
+
tension: PropTypes.number,
|
|
775
|
+
/**
|
|
776
|
+
* RestSpeedThreshold for the open / close animation
|
|
777
|
+
*/
|
|
778
|
+
restSpeedThreshold: PropTypes.number,
|
|
779
|
+
/**
|
|
780
|
+
* RestDisplacementThreshold for the open / close animation
|
|
781
|
+
*/
|
|
782
|
+
restDisplacementThreshold: PropTypes.number,
|
|
783
|
+
/**
|
|
784
|
+
* Should the row be closed when it is tapped
|
|
785
|
+
*/
|
|
786
|
+
closeOnRowPress: PropTypes.bool,
|
|
787
|
+
/**
|
|
788
|
+
* Disable ability to swipe the row left
|
|
789
|
+
*/
|
|
790
|
+
disableLeftSwipe: PropTypes.bool,
|
|
791
|
+
/**
|
|
792
|
+
* Disable ability to swipe the row right
|
|
793
|
+
*/
|
|
794
|
+
disableRightSwipe: PropTypes.bool,
|
|
795
|
+
/**
|
|
796
|
+
* Enable hidden row onLayout calculations to run always
|
|
797
|
+
*/
|
|
798
|
+
recalculateHiddenLayout: PropTypes.bool,
|
|
799
|
+
/**
|
|
800
|
+
* Disable hidden row onLayout calculations
|
|
801
|
+
*/
|
|
802
|
+
disableHiddenLayoutCalculation: PropTypes.bool,
|
|
803
|
+
/**
|
|
804
|
+
* Called when a swipe row is animating closed
|
|
805
|
+
*/
|
|
806
|
+
onRowClose: PropTypes.func,
|
|
807
|
+
/**
|
|
808
|
+
* Called when a swipe row has animated closed
|
|
809
|
+
*/
|
|
810
|
+
onRowDidClose: PropTypes.func,
|
|
811
|
+
/**
|
|
812
|
+
* Called when row shifted to leftActivationValue
|
|
813
|
+
*/
|
|
814
|
+
onLeftAction: PropTypes.func,
|
|
815
|
+
/**
|
|
816
|
+
* Called when row shifted to rightActivationValue
|
|
817
|
+
*/
|
|
818
|
+
onRightAction: PropTypes.func,
|
|
819
|
+
/**
|
|
820
|
+
* Called once when swipe value crosses the leftActivationValue
|
|
821
|
+
*/
|
|
822
|
+
onLeftActionStatusChange: PropTypes.func,
|
|
823
|
+
/**
|
|
824
|
+
* Called once when swipe value crosses the rightActivationValue
|
|
825
|
+
*/
|
|
826
|
+
onRightActionStatusChange: PropTypes.func,
|
|
827
|
+
/**
|
|
828
|
+
* Styles for the parent wrapper View of the SwipeRow
|
|
829
|
+
*/
|
|
830
|
+
style: PropTypes.object,
|
|
831
|
+
/**
|
|
832
|
+
* Should the row do a slide out preview to show that it is swipeable
|
|
833
|
+
*/
|
|
834
|
+
preview: PropTypes.bool,
|
|
835
|
+
/**
|
|
836
|
+
* Duration of the slide out preview animation
|
|
837
|
+
*/
|
|
838
|
+
previewDuration: PropTypes.number,
|
|
839
|
+
/**
|
|
840
|
+
* Should the animation repeat until false is provided
|
|
841
|
+
*/
|
|
842
|
+
previewRepeat: PropTypes.bool,
|
|
843
|
+
/**
|
|
844
|
+
* Time between each full completed animation in milliseconds
|
|
845
|
+
* Default: 1000 (1 second)
|
|
846
|
+
*/
|
|
847
|
+
previewRepeatDelay: PropTypes.number,
|
|
848
|
+
/**
|
|
849
|
+
* TranslateX value for the slide out preview animation
|
|
850
|
+
* Default: 0.5 * props.rightOpenValue
|
|
851
|
+
*/
|
|
852
|
+
previewOpenValue: PropTypes.number,
|
|
853
|
+
/**
|
|
854
|
+
* The dx value used to detect when a user has begun a swipe gesture
|
|
855
|
+
*/
|
|
856
|
+
directionalDistanceChangeThreshold: PropTypes.number,
|
|
857
|
+
/**
|
|
858
|
+
* What % of the left/right openValue does the user need to swipe
|
|
859
|
+
* past to trigger the row opening.
|
|
860
|
+
*/
|
|
861
|
+
swipeToOpenPercent: PropTypes.number,
|
|
862
|
+
/**
|
|
863
|
+
* Describes how much the ending velocity of the gesture contributes to whether the swipe will result in the item being closed or open.
|
|
864
|
+
* A velocity factor of 0 means that the velocity will have no bearing on whether the swipe settles on a closed or open position
|
|
865
|
+
* and it'll just take into consideration the swipeToOpenPercent.
|
|
866
|
+
*/
|
|
867
|
+
swipeToOpenVelocityContribution: PropTypes.number,
|
|
868
|
+
/**
|
|
869
|
+
* What % of the left/right openValue does the user need to swipe
|
|
870
|
+
* past to trigger the row closing.
|
|
871
|
+
*/
|
|
872
|
+
swipeToClosePercent: PropTypes.number,
|
|
873
|
+
/**
|
|
874
|
+
* callback to determine whether component should update (currentItem, newItem)
|
|
875
|
+
*/
|
|
876
|
+
shouldItemUpdate: PropTypes.func,
|
|
877
|
+
/**
|
|
878
|
+
* Callback invoked any time the swipe value of the row is changed
|
|
879
|
+
*/
|
|
880
|
+
onSwipeValueChange: PropTypes.func,
|
|
881
|
+
/**
|
|
882
|
+
* TranslateX amount(not value!) threshold that triggers force-closing the row to the Left End (positive number)
|
|
883
|
+
*/
|
|
884
|
+
forceCloseToLeftThreshold: PropTypes.number,
|
|
885
|
+
/**
|
|
886
|
+
* TranslateX amount(not value!) threshold that triggers force-closing the row to the Right End (positive number)
|
|
887
|
+
*/
|
|
888
|
+
forceCloseToRightThreshold: PropTypes.number,
|
|
889
|
+
/**
|
|
890
|
+
* Callback invoked when row is force closing to the Left End
|
|
891
|
+
*/
|
|
892
|
+
onForceCloseToLeft: PropTypes.func,
|
|
893
|
+
/**
|
|
894
|
+
* Callback invoked when row is force closing to the Right End
|
|
895
|
+
*/
|
|
896
|
+
onForceCloseToRight: PropTypes.func,
|
|
897
|
+
/**
|
|
898
|
+
* Callback invoked when row has finished force closing to the Left End
|
|
899
|
+
*/
|
|
900
|
+
onForceCloseToLeftEnd: PropTypes.func,
|
|
901
|
+
/**
|
|
902
|
+
* Callback invoked when row has finished force closing to the Right End
|
|
903
|
+
*/
|
|
904
|
+
onForceCloseToRightEnd: PropTypes.func,
|
|
905
|
+
/**
|
|
906
|
+
* useNativeDriver: true for all animations where possible
|
|
907
|
+
*/
|
|
908
|
+
useNativeDriver: PropTypes.bool,
|
|
909
|
+
/**
|
|
910
|
+
* Children
|
|
911
|
+
*/
|
|
912
|
+
children: PropTypes.node.isRequired,
|
|
913
|
+
/**
|
|
914
|
+
* Key used to identify rows on swipe value changes
|
|
915
|
+
*/
|
|
916
|
+
swipeKey: PropTypes.string,
|
|
917
|
+
/**
|
|
918
|
+
* Callback that runs after row swipe preview is finished
|
|
919
|
+
*/
|
|
920
|
+
onPreviewEnd: PropTypes.func,
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
SwipeRow.defaultProps = {
|
|
924
|
+
leftOpenValue: 0,
|
|
925
|
+
rightOpenValue: 0,
|
|
926
|
+
closeOnRowPress: true,
|
|
927
|
+
disableLeftSwipe: false,
|
|
928
|
+
disableRightSwipe: false,
|
|
929
|
+
recalculateHiddenLayout: false,
|
|
930
|
+
disableHiddenLayoutCalculation: false,
|
|
931
|
+
preview: false,
|
|
932
|
+
previewDuration: 300,
|
|
933
|
+
previewOpenDelay: DEFAULT_PREVIEW_OPEN_DELAY,
|
|
934
|
+
directionalDistanceChangeThreshold: 2,
|
|
935
|
+
swipeToOpenPercent: 50,
|
|
936
|
+
swipeToOpenVelocityContribution: 0,
|
|
937
|
+
swipeToClosePercent: 50,
|
|
938
|
+
item: {},
|
|
939
|
+
useNativeDriver: true,
|
|
940
|
+
previewRepeat: false,
|
|
941
|
+
previewRepeatDelay: 1000,
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
export default SwipeRow;
|