@cometchat/chat-uikit-react-native 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/src/main/java/com/reactnativecometchatuikit/{RNSoundModule.java → CometChatSoundModule.java} +22 -22
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -1
- package/ios/{RNSound.h → CometChatSoundModule.h} +1 -1
- package/ios/{RNSound.m → CometChatSoundModule.m} +2 -2
- package/lib/CometChatConversations/ConversationsConfiguration.d.ts +1 -0
- package/lib/CometChatDetails/DetailsConfiguration.d.ts +1 -0
- package/lib/CometChatGroupMembers/GroupMemberConfiguration.d.ts +1 -0
- package/lib/CometChatGroups/GroupsConfiguration.d.ts +1 -0
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +1 -7
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageHeader/MessageHeaderConfiguration.d.ts +1 -0
- package/lib/CometChatMessageList/CometChatMessageList.js +18 -49
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/MessageListConfiguration.d.ts +1 -0
- package/lib/CometChatMessages/MessagesConfiguration.d.ts +1 -0
- package/lib/CometChatTabs/TabItems.d.ts +1 -0
- package/lib/CometChatThreadedMessages/ThreadedMessagesConfiguration.d.ts +1 -0
- package/lib/calls/CometChatCallDetails/CallDetailsConfiguration.d.ts +1 -0
- package/lib/calls/CometChatCallHistory/CallHistoryConfiguration.d.ts +1 -0
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +3 -3
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
- package/lib/extensions/ImageModeration/ImageModerationDecorator.d.ts +1 -0
- package/lib/extensions/ImageModeration/ImageModerationFilter.js +4 -4
- package/lib/extensions/ImageModeration/ImageModerationFilter.js.map +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewExtentionDecorator.d.ts +1 -0
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.d.ts +1 -0
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.js +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.js.map +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.js +2 -4
- package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
- package/lib/extensions/TextModeration/TextModerationExtensionDecorator.d.ts +1 -0
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -14
- package/lib/index.js.map +1 -1
- package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +0 -2
- package/lib/shared/CometChatUiKit/CometChatUIKit.js +2 -13
- package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
- package/lib/shared/CometChatUiKit/UIKitSettings.d.ts +1 -5
- package/lib/shared/CometChatUiKit/UIKitSettings.js +1 -3
- package/lib/shared/CometChatUiKit/UIKitSettings.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +0 -2
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +1 -3
- package/lib/shared/events/CometChatUIEventHandler/Listener.js +1 -4
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/CometChatUIEvents.d.ts +1 -2
- package/lib/shared/events/CometChatUIEvents.js +0 -1
- package/lib/shared/events/CometChatUIEvents.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +2 -1
- package/lib/shared/framework/DataSourceDecorator.d.ts +2 -1
- package/lib/shared/framework/DataSourceDecorator.js +2 -2
- package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +1 -1
- package/lib/shared/framework/MessageDataSource.js +2 -2
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/helper/types/index.d.ts +1 -0
- package/lib/shared/modals/CometChatDetailsOption.d.ts +1 -0
- package/lib/shared/modals/CometChatMessageOption.d.ts +1 -0
- package/lib/shared/modals/CometChatMessageTemplate.d.ts +1 -0
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +153 -230
- package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +0 -4
- package/package.json +2 -2
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +3 -4
- package/src/CometChatConversations/CometChatConversations.tsx +56 -46
- package/src/CometChatMessageHeader/listners.ts +5 -4
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +35 -35
- package/src/CometChatMessageList/CometChatMessageList.tsx +251 -142
- package/src/CometChatMessages/CometChatMessages.tsx +4 -3
- package/src/CometChatTabs/CometChatTabs.tsx +1 -1
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +3 -9
- package/src/index.ts +59 -17
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +98 -10
- package/src/shared/constants/UIKitConstants.ts +81 -47
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +46 -2
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +61 -2
- package/src/shared/events/ListenerInitializer.ts +73 -0
- package/src/shared/events/messages.ts +14 -0
- package/src/shared/framework/DataSource.ts +11 -0
- package/src/shared/framework/DataSourceDecorator.tsx +35 -0
- package/src/shared/framework/MessageDataSource.tsx +83 -3
- package/src/shared/index.ts +44 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +118 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +19 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +34 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +3 -0
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +69 -0
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +119 -0
- package/src/shared/modals/InteractiveData/InteractiveData/index.ts +2 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +102 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +45 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +61 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +75 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +83 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +32 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +39 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +76 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +76 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +101 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +10 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +41 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +64 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +2 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +142 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +38 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +152 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +3 -0
- package/src/shared/modals/InteractiveData/index.ts +28 -0
- package/src/shared/modals/index.ts +19 -0
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +4 -1
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +4 -1
- package/src/shared/resources/CometChatSoundManager/CometChatSoundManager.js +2 -2
- package/src/shared/resources/CometChatSoundManager/sound.js +35 -35
- package/src/shared/utils/InteractiveMessageUtils.ts +20 -0
- package/src/shared/utils/NetworkUtils.tsx +20 -0
- package/src/shared/utils/conversationUtils.ts +9 -6
- package/src/shared/views/CometChatButton/CometChatButton.tsx +32 -22
- package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +47 -0
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +173 -0
- package/src/shared/views/CometChatCardBubble/index.tsx +1 -0
- package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +43 -0
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +79 -0
- package/src/shared/views/CometChatDate/CometChatDate.tsx +2 -3
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +126 -0
- package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +39 -0
- package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
- package/src/shared/views/CometChatDropDown/resources/index.js +5 -0
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +464 -0
- package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +91 -0
- package/src/shared/views/CometChatFormBubble/index.tsx +1 -0
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +13 -5
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +14 -3
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +27 -0
- package/src/shared/views/CometChatLabel/LabelStyle.ts +19 -0
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +5 -4
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +66 -0
- package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +55 -0
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +67 -0
- package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +38 -0
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +63 -0
- package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +35 -0
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +67 -0
- package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +26 -0
- package/src/shared/views/index.ts +7 -1
- package/lib/AI/AIConversationStarter/AIConversationStarter.d.ts +0 -12
- package/lib/AI/AIConversationStarter/AIConversationStarter.js +0 -31
- package/lib/AI/AIConversationStarter/AIConversationStarter.js.map +0 -1
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -25
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js +0 -175
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js.map +0 -1
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.d.ts +0 -4
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js +0 -8
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js.map +0 -1
- package/lib/AI/AIConversationStarter/configuration.d.ts +0 -14
- package/lib/AI/AIConversationStarter/configuration.js +0 -16
- package/lib/AI/AIConversationStarter/configuration.js.map +0 -1
- package/lib/AI/AIConversationStarter/style.d.ts +0 -31
- package/lib/AI/AIConversationStarter/style.js +0 -62
- package/lib/AI/AIConversationStarter/style.js.map +0 -1
- package/lib/AI/AIEnabler.d.ts +0 -10
- package/lib/AI/AIEnabler.js +0 -102
- package/lib/AI/AIEnabler.js.map +0 -1
- package/lib/AI/AIEnablerDecorator.d.ts +0 -43
- package/lib/AI/AIEnablerDecorator.js +0 -251
- package/lib/AI/AIEnablerDecorator.js.map +0 -1
- package/lib/AI/AIExtensionDataSource.d.ts +0 -6
- package/lib/AI/AIExtensionDataSource.js +0 -10
- package/lib/AI/AIExtensionDataSource.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartReplies.d.ts +0 -10
- package/lib/AI/AISmartReplies/AISmartReplies.js +0 -23
- package/lib/AI/AISmartReplies/AISmartReplies.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -7
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js +0 -12
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.d.ts +0 -12
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.js +0 -15
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.js.map +0 -1
- package/lib/AI/AISmartReplies/configuration.d.ts +0 -14
- package/lib/AI/AISmartReplies/configuration.js +0 -16
- package/lib/AI/AISmartReplies/configuration.js.map +0 -1
- package/lib/AI/CardView.d.ts +0 -19
- package/lib/AI/CardView.js +0 -45
- package/lib/AI/CardView.js.map +0 -1
- package/lib/AI/CardViewStyle.d.ts +0 -29
- package/lib/AI/CardViewStyle.js +0 -36
- package/lib/AI/CardViewStyle.js.map +0 -1
- package/lib/AI/configuration.d.ts +0 -14
- package/lib/AI/configuration.js +0 -16
- package/lib/AI/configuration.js.map +0 -1
- package/lib/AI/resources/index.d.ts +0 -5
- package/lib/AI/resources/index.js +0 -6
- package/lib/AI/resources/index.js.map +0 -1
- package/lib/AI/style.d.ts +0 -115
- package/lib/AI/style.js +0 -139
- package/lib/AI/style.js.map +0 -1
- package/lib/AI/utils.d.ts +0 -38
- package/lib/AI/utils.js +0 -28
- package/lib/AI/utils.js.map +0 -1
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "اقرأ",
|
|
271
271
|
"No_RECIPIENT": "لا يوجد مستلم",
|
|
272
272
|
"RECEIPT_INFORMATION": "معلومات الاستلام",
|
|
273
|
-
"MESSAGE": "رسالة"
|
|
273
|
+
"MESSAGE": "رسالة",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "شكرًا لك على ملء النموذج.",
|
|
275
|
+
"FORM":"نموذج",
|
|
276
|
+
"CARD":"بطاقة"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Lesen",
|
|
271
271
|
"No_RECIPIENT": "Kein Empfänger",
|
|
272
272
|
"RECEIPT_INFORMATION": "Informationen zum Zahlungseingang",
|
|
273
|
-
"MESSAGE": "Nachricht"
|
|
273
|
+
"MESSAGE": "Nachricht",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Vielen Dank für das Ausfüllen des Formulars.",
|
|
275
|
+
"FORM":"Formular",
|
|
276
|
+
"CARD":"Karte"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Read",
|
|
271
271
|
"No_RECIPIENT": "No Recipient",
|
|
272
272
|
"RECEIPT_INFORMATION": "Receipt Information",
|
|
273
|
-
"MESSAGE": "Message"
|
|
273
|
+
"MESSAGE": "Message",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Thank you for filling out the form.",
|
|
275
|
+
"FORM":"Form",
|
|
276
|
+
"CARD":"Card"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Leer",
|
|
271
271
|
"No_RECIPIENT": "Sin destinatario",
|
|
272
272
|
"RECEIPT_INFORMATION": "Información del recibo",
|
|
273
|
-
"MESSAGE": "Mensaje"
|
|
273
|
+
"MESSAGE": "Mensaje",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Gracias por rellenar el formulario.",
|
|
275
|
+
"FORM":"Formulario",
|
|
276
|
+
"CARD":"Tarjeta"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Lisez",
|
|
271
271
|
"No_RECIPIENT": "Aucun destinataire",
|
|
272
272
|
"RECEIPT_INFORMATION": "Informations sur le reçu",
|
|
273
|
-
"MESSAGE": "Un message"
|
|
273
|
+
"MESSAGE": "Un message",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Merci d'avoir rempli le formulaire.",
|
|
275
|
+
"FORM":"Formulaire",
|
|
276
|
+
"CARD":"Carte"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "पढ़ें",
|
|
271
271
|
"No_RECIPIENT": "कोई प्राप्तकर्ता नहीं",
|
|
272
272
|
"RECEIPT_INFORMATION": "रसीद की जानकारी",
|
|
273
|
-
"MESSAGE": "सन्देश"
|
|
273
|
+
"MESSAGE": "सन्देश",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "फॉर्म भरने के लिए धन्यवाद।",
|
|
275
|
+
"FORM":"प्रपत्र",
|
|
276
|
+
"CARD":"कार्ड"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Leggi",
|
|
271
271
|
"No_RECIPIENT": "Nessun destinatario",
|
|
272
272
|
"RECEIPT_INFORMATION": "Informazioni sulla ricevuta",
|
|
273
|
-
"MESSAGE": "Messaggio"
|
|
273
|
+
"MESSAGE": "Messaggio",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Grazie per aver compilato il modulo.",
|
|
275
|
+
"FORM":"Modulo",
|
|
276
|
+
"CARD":"Carta"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Baca",
|
|
271
271
|
"No_RECIPIENT": "Tiada Penerima",
|
|
272
272
|
"RECEIPT_INFORMATION": "Maklumat Resit",
|
|
273
|
-
"MESSAGE": "Pesanan"
|
|
273
|
+
"MESSAGE": "Pesanan",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Terima kasih kerana mengisi borang.",
|
|
275
|
+
"FORM":"Borang",
|
|
276
|
+
"CARD":"Kad"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Leia",
|
|
271
271
|
"No_RECIPIENT": "Nenhum destinatário",
|
|
272
272
|
"RECEIPT_INFORMATION": "Informações sobre o recibo",
|
|
273
|
-
"MESSAGE": "Mensagem"
|
|
273
|
+
"MESSAGE": "Mensagem",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Obrigado por preencher o formulário.",
|
|
275
|
+
"FORM":"Formulário",
|
|
276
|
+
"CARD":"Cartão"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Прочитайте",
|
|
271
271
|
"No_RECIPIENT": "Нет получателя",
|
|
272
272
|
"RECEIPT_INFORMATION": "Информация о чеке",
|
|
273
|
-
"MESSAGE": "Послание"
|
|
273
|
+
"MESSAGE": "Послание",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Спасибо за заполнение формы.",
|
|
275
|
+
"FORM":"Форма",
|
|
276
|
+
"CARD":"Карточка"
|
|
274
277
|
}
|
|
@@ -270,5 +270,8 @@
|
|
|
270
270
|
"READ": "Läs",
|
|
271
271
|
"No_RECIPIENT": "Ingen mottagare",
|
|
272
272
|
"RECEIPT_INFORMATION": "Information om kvitto",
|
|
273
|
-
"MESSAGE": "Meddelande"
|
|
273
|
+
"MESSAGE": "Meddelande",
|
|
274
|
+
"FORM_COMPLETION_MESSAGE": "Tack för att du fyller i formuläret.",
|
|
275
|
+
"FORM":"Formulär",
|
|
276
|
+
"CARD":"Kort"
|
|
274
277
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vibration, NativeModules } from 'react-native';
|
|
2
|
-
const {
|
|
2
|
+
const { CometChatSoundModule } = NativeModules;
|
|
3
3
|
import * as consts from '../../constants/UIKitConstants';
|
|
4
4
|
import Sound from './sound';
|
|
5
5
|
import {
|
|
@@ -22,7 +22,7 @@ export class CometChatSoundManager {
|
|
|
22
22
|
static onPlay = async (resource, loop, isRequire) => {
|
|
23
23
|
try {
|
|
24
24
|
let otherAudioPlaying =
|
|
25
|
-
await
|
|
25
|
+
await CometChatSoundModule.checkOtherAudioPlaying();
|
|
26
26
|
if (otherAudioPlaying) {
|
|
27
27
|
Vibration.vibrate(consts.PATTERN, loop);
|
|
28
28
|
} else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NativeModules, NativeEventEmitter } from 'react-native';
|
|
2
|
-
const {
|
|
3
|
-
var IsAndroid =
|
|
4
|
-
var IsWindows =
|
|
2
|
+
const {CometChatSoundModule} = NativeModules ;
|
|
3
|
+
var IsAndroid = CometChatSoundModule.IsAndroid;
|
|
4
|
+
var IsWindows = CometChatSoundModule.IsWindows;
|
|
5
5
|
import resolveAssetSource from "react-native/Libraries/Image/resolveAssetSource";
|
|
6
|
-
var eventEmitter = new NativeEventEmitter(
|
|
6
|
+
var eventEmitter = new NativeEventEmitter(CometChatSoundModule);
|
|
7
7
|
|
|
8
8
|
var nextKey = 0;
|
|
9
9
|
|
|
@@ -23,14 +23,14 @@ function setAndroidVolumes(sound) {
|
|
|
23
23
|
const relativeVolume = calculateRelativeVolume(sound._volume, sound._pan);
|
|
24
24
|
if (sound._pan < 0) {
|
|
25
25
|
// left is louder
|
|
26
|
-
|
|
26
|
+
CometChatSoundModule.setVolume(sound._key, sound._volume, relativeVolume);
|
|
27
27
|
} else {
|
|
28
28
|
// right is louder
|
|
29
|
-
|
|
29
|
+
CometChatSoundModule.setVolume(sound._key, relativeVolume, sound._volume);
|
|
30
30
|
}
|
|
31
31
|
} else {
|
|
32
32
|
// no panning, same volume on both channels
|
|
33
|
-
|
|
33
|
+
CometChatSoundModule.setVolume(sound._key, sound._volume, sound._volume);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -60,7 +60,7 @@ class Sound {
|
|
|
60
60
|
this._numberOfLoops = 0;
|
|
61
61
|
this._speed = 1;
|
|
62
62
|
this._pitch = 1;
|
|
63
|
-
|
|
63
|
+
CometChatSoundModule.prepare(this._filename, this._key, options || {}, (error, props) => {
|
|
64
64
|
if (props) {
|
|
65
65
|
if (typeof props.duration === 'number') {
|
|
66
66
|
this._duration = props.duration;
|
|
@@ -101,31 +101,31 @@ class Sound {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
static enable(enabled) {
|
|
104
|
-
|
|
104
|
+
CometChatSoundModule.enable(enabled);
|
|
105
105
|
}
|
|
106
106
|
static enableInSilenceMode(enabled) {
|
|
107
107
|
if (!IsAndroid && !IsWindows) {
|
|
108
|
-
|
|
108
|
+
CometChatSoundModule.enableInSilenceMode(enabled);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
static setActive(value) {
|
|
112
112
|
if (!IsAndroid && !IsWindows) {
|
|
113
|
-
|
|
113
|
+
CometChatSoundModule.setActive(value);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
static setCategory(value, mixWithOthers = false) {
|
|
117
117
|
if (!IsWindows) {
|
|
118
|
-
|
|
118
|
+
CometChatSoundModule.setCategory(value, mixWithOthers);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
static setMode(value) {
|
|
122
122
|
if (!IsAndroid && !IsWindows) {
|
|
123
|
-
|
|
123
|
+
CometChatSoundModule.setMode(value);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
static setSpeakerPhone(value) {
|
|
127
127
|
if (!IsAndroid && !IsWindows) {
|
|
128
|
-
|
|
128
|
+
CometChatSoundModule.setSpeakerPhone(value);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
isLoaded() {
|
|
@@ -133,7 +133,7 @@ class Sound {
|
|
|
133
133
|
}
|
|
134
134
|
play(onEnd) {
|
|
135
135
|
if (this._loaded) {
|
|
136
|
-
|
|
136
|
+
CometChatSoundModule.play(this._key, (successfully) => onEnd && onEnd(successfully));
|
|
137
137
|
} else {
|
|
138
138
|
onEnd && onEnd(false);
|
|
139
139
|
}
|
|
@@ -141,7 +141,7 @@ class Sound {
|
|
|
141
141
|
}
|
|
142
142
|
pause(callback) {
|
|
143
143
|
if (this._loaded) {
|
|
144
|
-
|
|
144
|
+
CometChatSoundModule.pause(this._key, () => {
|
|
145
145
|
this._playing = false;
|
|
146
146
|
callback && callback();
|
|
147
147
|
});
|
|
@@ -150,7 +150,7 @@ class Sound {
|
|
|
150
150
|
}
|
|
151
151
|
stop(callback) {
|
|
152
152
|
if (this._loaded) {
|
|
153
|
-
|
|
153
|
+
CometChatSoundModule.stop(this._key, () => {
|
|
154
154
|
this._playing = false;
|
|
155
155
|
callback && callback();
|
|
156
156
|
});
|
|
@@ -159,14 +159,14 @@ class Sound {
|
|
|
159
159
|
}
|
|
160
160
|
reset() {
|
|
161
161
|
if (this._loaded && IsAndroid) {
|
|
162
|
-
|
|
162
|
+
CometChatSoundModule.reset(this._key);
|
|
163
163
|
this._playing = false;
|
|
164
164
|
}
|
|
165
165
|
return this;
|
|
166
166
|
}
|
|
167
167
|
release() {
|
|
168
168
|
if (this._loaded) {
|
|
169
|
-
|
|
169
|
+
CometChatSoundModule.release(this._key);
|
|
170
170
|
this._loaded = false;
|
|
171
171
|
if (!IsWindows) {
|
|
172
172
|
if (this.onPlaySubscription != null) {
|
|
@@ -201,7 +201,7 @@ class Sound {
|
|
|
201
201
|
if (IsAndroid) {
|
|
202
202
|
setAndroidVolumes(this);
|
|
203
203
|
} else {
|
|
204
|
-
|
|
204
|
+
CometChatSoundModule.setVolume(this._key, value);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
return this;
|
|
@@ -214,20 +214,20 @@ class Sound {
|
|
|
214
214
|
} else if (IsAndroid) {
|
|
215
215
|
setAndroidVolumes(this);
|
|
216
216
|
} else {
|
|
217
|
-
|
|
217
|
+
CometChatSoundModule.setPan(this._key, value);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
return this;
|
|
221
221
|
}
|
|
222
222
|
getSystemVolume(callback) {
|
|
223
223
|
if (!IsWindows) {
|
|
224
|
-
|
|
224
|
+
CometChatSoundModule.getSystemVolume(callback);
|
|
225
225
|
}
|
|
226
226
|
return this;
|
|
227
227
|
}
|
|
228
228
|
setSystemVolume(value) {
|
|
229
229
|
if (IsAndroid) {
|
|
230
|
-
|
|
230
|
+
CometChatSoundModule.setSystemVolume(value);
|
|
231
231
|
}
|
|
232
232
|
return this;
|
|
233
233
|
}
|
|
@@ -241,9 +241,9 @@ class Sound {
|
|
|
241
241
|
this._numberOfLoops = value;
|
|
242
242
|
if (this._loaded) {
|
|
243
243
|
if (IsAndroid || IsWindows) {
|
|
244
|
-
|
|
244
|
+
CometChatSoundModule.setLooping(this._key, !!value);
|
|
245
245
|
} else {
|
|
246
|
-
|
|
246
|
+
CometChatSoundModule.setNumberOfLoops(this._key, value);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
return this;
|
|
@@ -252,7 +252,7 @@ class Sound {
|
|
|
252
252
|
this._speed = value;
|
|
253
253
|
if (this._loaded) {
|
|
254
254
|
if (!IsWindows) {
|
|
255
|
-
|
|
255
|
+
CometChatSoundModule.setSpeed(this._key, value);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
return this;
|
|
@@ -261,26 +261,26 @@ class Sound {
|
|
|
261
261
|
this._pitch = value;
|
|
262
262
|
if (this._loaded) {
|
|
263
263
|
if (IsAndroid) {
|
|
264
|
-
|
|
264
|
+
CometChatSoundModule.setPitch(this._key, value);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
return this;
|
|
268
268
|
}
|
|
269
269
|
getCurrentTime(callback) {
|
|
270
270
|
if (this._loaded) {
|
|
271
|
-
|
|
271
|
+
CometChatSoundModule.getCurrentTime(this._key, callback);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
setCurrentTime(value) {
|
|
275
275
|
if (this._loaded) {
|
|
276
|
-
|
|
276
|
+
CometChatSoundModule.setCurrentTime(this._key, value);
|
|
277
277
|
}
|
|
278
278
|
return this;
|
|
279
279
|
}
|
|
280
280
|
// android only
|
|
281
281
|
setSpeakerphoneOn(value) {
|
|
282
282
|
if (IsAndroid) {
|
|
283
|
-
|
|
283
|
+
CometChatSoundModule.setSpeakerphoneOn(this._key, value);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
isPlaying() {
|
|
@@ -288,7 +288,7 @@ class Sound {
|
|
|
288
288
|
}
|
|
289
289
|
async checkOtherAudioPlaying() {
|
|
290
290
|
try{
|
|
291
|
-
return await
|
|
291
|
+
return await CometChatSoundModule.checkOtherAudioPlaying();
|
|
292
292
|
}
|
|
293
293
|
catch(error){
|
|
294
294
|
return false;
|
|
@@ -328,9 +328,9 @@ Sound.prototype.setCategory = function(value) {
|
|
|
328
328
|
Sound.setCategory(value, false);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
Sound.MAIN_BUNDLE =
|
|
332
|
-
Sound.DOCUMENT =
|
|
333
|
-
Sound.LIBRARY =
|
|
334
|
-
Sound.CACHES =
|
|
331
|
+
Sound.MAIN_BUNDLE = CometChatSoundModule.MainBundlePath;
|
|
332
|
+
Sound.DOCUMENT = CometChatSoundModule.NSDocumentDirectory;
|
|
333
|
+
Sound.LIBRARY = CometChatSoundModule.NSLibraryDirectory;
|
|
334
|
+
Sound.CACHES = CometChatSoundModule.NSCachesDirectory;
|
|
335
335
|
|
|
336
336
|
export default Sound;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MessageTypeConstants } from "../constants/UIKitConstants";
|
|
2
|
+
import { CardMessage, CustomInteractiveMessage, FormMessage } from "../modals/InteractiveData";
|
|
3
|
+
|
|
4
|
+
export class InteractiveMessageUtils {
|
|
5
|
+
|
|
6
|
+
static convertInteractiveMessage(item: any): any {
|
|
7
|
+
if (item.getDeletedBy() != null) {
|
|
8
|
+
return item;
|
|
9
|
+
}
|
|
10
|
+
switch (item.getType()) {
|
|
11
|
+
case MessageTypeConstants.form:
|
|
12
|
+
return FormMessage.fromJSON(item);
|
|
13
|
+
case MessageTypeConstants.card:
|
|
14
|
+
return CardMessage.fromJSON(item);
|
|
15
|
+
default:
|
|
16
|
+
return CustomInteractiveMessage.fromJSON(item);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class CometChatNetworkUtils {
|
|
2
|
+
|
|
3
|
+
static async fetcher({ url, method, body, headers }: { url: string, method: string, body: any, headers: any }) {
|
|
4
|
+
try {
|
|
5
|
+
const res = await fetch(url, {
|
|
6
|
+
method: method,
|
|
7
|
+
body: JSON.stringify(body),
|
|
8
|
+
headers: {
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
...headers,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const json = await res.json();
|
|
14
|
+
return res;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
throw error;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -14,7 +14,7 @@ export class CometChatConversationUtils {
|
|
|
14
14
|
return options;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
static getLastMessage(conversation
|
|
17
|
+
static getLastMessage(conversation: CometChat.Conversation): CometChat.BaseMessage {
|
|
18
18
|
let msg = conversation.getLastMessage();
|
|
19
19
|
if (!msg) {
|
|
20
20
|
return undefined;
|
|
@@ -36,12 +36,12 @@ export class CometChatConversationUtils {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
static
|
|
39
|
+
static getMessagePreview = (lastMessage: CometChat.BaseMessage): string => {
|
|
40
40
|
|
|
41
|
-
if (lastMessage!=undefined) {
|
|
41
|
+
if (lastMessage != undefined) {
|
|
42
42
|
|
|
43
43
|
if (lastMessage.getDeletedAt() !== undefined) {
|
|
44
|
-
|
|
44
|
+
return localize("THIS_MESSAGE_DELETED");
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
let groupText = "", msgText = "";
|
|
@@ -66,8 +66,11 @@ export class CometChatConversationUtils {
|
|
|
66
66
|
} else if (lastMessage.getCategory() == CometChat.CATEGORY_CUSTOM as CometChat.MessageCategory) {
|
|
67
67
|
msgText = lastMessage.getType();
|
|
68
68
|
} else if (lastMessage.getCategory() == CometChat.CATEGORY_ACTION as CometChat.MessageCategory) {
|
|
69
|
-
msgText =(lastMessage as CometChat.Action).getMessage();
|
|
70
|
-
} else {
|
|
69
|
+
msgText = (lastMessage as CometChat.Action).getMessage();
|
|
70
|
+
} else if (lastMessage.getCategory() === CometChat.CATEGORY_INTERACTIVE) {
|
|
71
|
+
msgText = lastMessage.getType() === "form" ? `${localize('FORM')} 📋` : `${localize('CARD')} 🪧`;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
71
74
|
msgText = lastMessage['metaData']?.pushNotification;
|
|
72
75
|
}
|
|
73
76
|
return (msgText)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import { View, TouchableOpacity, Text, Image } from "react-native";
|
|
2
|
+
import { View, TouchableOpacity, Text, Image, ActivityIndicator } from "react-native";
|
|
3
3
|
import { ImageType } from '../../base';
|
|
4
4
|
import { ButtonStyle, ButtonStyleInterface } from './CometChatButtonStyle';
|
|
5
5
|
import { CometChatContext } from '../../CometChatContext';
|
|
@@ -10,7 +10,7 @@ export interface CometChatButtonInterface {
|
|
|
10
10
|
iconUrl?: ImageType,
|
|
11
11
|
style?: ButtonStyleInterface,
|
|
12
12
|
onPress?: () => void,
|
|
13
|
-
|
|
13
|
+
isLoading?: boolean,
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export const CometChatButton = (props: CometChatButtonInterface) => {
|
|
@@ -18,7 +18,8 @@ export const CometChatButton = (props: CometChatButtonInterface) => {
|
|
|
18
18
|
iconUrl,
|
|
19
19
|
onPress,
|
|
20
20
|
style,
|
|
21
|
-
text
|
|
21
|
+
text,
|
|
22
|
+
isLoading
|
|
22
23
|
} = props;
|
|
23
24
|
|
|
24
25
|
const { theme } = useContext(CometChatContext);
|
|
@@ -41,25 +42,34 @@ export const CometChatButton = (props: CometChatButtonInterface) => {
|
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
return (
|
|
44
|
-
<TouchableOpacity onPress={onPress} style={{alignItems: "center", backgroundColor, borderRadius}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
<TouchableOpacity onPress={onPress} style={[{ alignItems: "center", backgroundColor, borderRadius }, !iconUrl && {
|
|
46
|
+
height, width, justifyContent: "center",
|
|
47
|
+
}]}>
|
|
48
|
+
{!isLoading ? <>
|
|
49
|
+
{Boolean(iconUrl) && <View style={[Style.container, { backgroundColor: iconBackgroundColor, borderRadius: iconCornerRadius, ...border }]}>
|
|
50
|
+
<Image
|
|
51
|
+
source={iconUrl}
|
|
52
|
+
resizeMode="contain"
|
|
53
|
+
style={{
|
|
54
|
+
height,
|
|
55
|
+
width,
|
|
56
|
+
backgroundColor: iconBackgroundColor,
|
|
57
|
+
borderRadius: iconCornerRadius,
|
|
58
|
+
tintColor: iconTint,
|
|
59
|
+
...iconBorder,
|
|
60
|
+
}} />
|
|
61
|
+
</View>}
|
|
62
|
+
{
|
|
63
|
+
Boolean(text) && <Text style={{
|
|
64
|
+
color: textColor,
|
|
65
|
+
...textFont
|
|
66
|
+
}}>{text}</Text>
|
|
67
|
+
}
|
|
68
|
+
</>
|
|
69
|
+
:
|
|
70
|
+
<View style={{ position: "absolute", alignSelf: "center" }}>
|
|
71
|
+
<ActivityIndicator size="small" color={textColor} />
|
|
72
|
+
</View>
|
|
63
73
|
}
|
|
64
74
|
</TouchableOpacity>
|
|
65
75
|
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseStyle, FontStyle } from "../../base";
|
|
2
|
+
import { ButtonStyleInterface } from "../CometChatButton";
|
|
3
|
+
import { ImageBubbleStyleInterface } from "../CometChatImageBubble";
|
|
4
|
+
|
|
5
|
+
export interface CardBubbleStyleInterface extends BaseStyle {
|
|
6
|
+
textFont?: FontStyle;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
padding?: number;
|
|
9
|
+
buttonStyle?: ButtonStyleInterface;
|
|
10
|
+
imageStyle?: ImageBubbleStyleInterface;
|
|
11
|
+
imageResizeMode?: "cover" | "contain" | "stretch" | "repeat" | "center";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class CardBubbleStyle extends BaseStyle {
|
|
15
|
+
textFont?: FontStyle;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
padding?: number;
|
|
18
|
+
buttonStyle?: ButtonStyleInterface;
|
|
19
|
+
imageStyle?: ImageBubbleStyleInterface;
|
|
20
|
+
imageResizeMode?: "cover" | "contain" | "stretch" | "repeat" | "center";
|
|
21
|
+
|
|
22
|
+
constructor({
|
|
23
|
+
height = "auto",
|
|
24
|
+
width = "auto",
|
|
25
|
+
backgroundColor,
|
|
26
|
+
borderRadius,
|
|
27
|
+
textFont,
|
|
28
|
+
textColor,
|
|
29
|
+
padding,
|
|
30
|
+
buttonStyle,
|
|
31
|
+
imageStyle,
|
|
32
|
+
imageResizeMode = "cover",
|
|
33
|
+
}: CardBubbleStyleInterface) {
|
|
34
|
+
super({
|
|
35
|
+
backgroundColor,
|
|
36
|
+
borderRadius,
|
|
37
|
+
height,
|
|
38
|
+
width
|
|
39
|
+
});
|
|
40
|
+
this.textFont = textFont;
|
|
41
|
+
this.textColor = textColor;
|
|
42
|
+
this.padding = padding;
|
|
43
|
+
this.buttonStyle = buttonStyle;
|
|
44
|
+
this.imageStyle = imageStyle;
|
|
45
|
+
this.imageResizeMode = imageResizeMode;
|
|
46
|
+
}
|
|
47
|
+
}
|