@developer_tribe/react-native-comnyx 0.13.13 → 0.15.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.
Files changed (132) hide show
  1. package/android/generated/RCTAppDependencyProvider.h +25 -0
  2. package/android/generated/RCTAppDependencyProvider.mm +55 -0
  3. package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  4. package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  5. package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
  6. package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  7. package/android/generated/ReactAppDependencyProvider.podspec +34 -0
  8. package/android/generated/jni/CMakeLists.txt +36 -0
  9. package/android/generated/jni/RNComnyxSpec-generated.cpp +22 -0
  10. package/android/generated/jni/RNComnyxSpec.h +24 -0
  11. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +17 -0
  12. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +19 -0
  13. package/android/src/main/AndroidManifest.xml +15 -0
  14. package/android/src/main/AndroidManifestNew.xml +4 -0
  15. package/android/src/main/java/com/comnyx/ComnyxMediaPickerModule.kt +347 -0
  16. package/android/src/main/java/com/comnyx/ComnyxPackage.kt +1 -1
  17. package/android/src/main/java/com/comnyx/VideoPlayerActivity.kt +91 -0
  18. package/ios/ComnyxMediaPicker.m +29 -0
  19. package/ios/ComnyxMediaPicker.swift +436 -0
  20. package/lib/commonjs/NativeComnyxMediaPicker.js +83 -0
  21. package/lib/commonjs/NativeComnyxMediaPicker.js.map +1 -0
  22. package/lib/commonjs/api/index.js +19 -0
  23. package/lib/commonjs/api/index.js.map +1 -1
  24. package/lib/commonjs/api/media.js +76 -0
  25. package/lib/commonjs/api/media.js.map +1 -0
  26. package/lib/commonjs/assets/attachment-01.png +0 -0
  27. package/lib/commonjs/assets/gallery.png +0 -0
  28. package/lib/commonjs/assets/video-play.png +0 -0
  29. package/lib/commonjs/assets/x-circle.png +0 -0
  30. package/lib/commonjs/components/ChatList.js +48 -22
  31. package/lib/commonjs/components/ChatList.js.map +1 -1
  32. package/lib/commonjs/components/LinkifyText.js +5 -1
  33. package/lib/commonjs/components/LinkifyText.js.map +1 -1
  34. package/lib/commonjs/components/MediaMessageItem.js +333 -0
  35. package/lib/commonjs/components/MediaMessageItem.js.map +1 -0
  36. package/lib/commonjs/components/MediaPickerButton.js +244 -0
  37. package/lib/commonjs/components/MediaPickerButton.js.map +1 -0
  38. package/lib/commonjs/components/MediaViewerModal.js +164 -0
  39. package/lib/commonjs/components/MediaViewerModal.js.map +1 -0
  40. package/lib/commonjs/components/MessageInput.js +344 -73
  41. package/lib/commonjs/components/MessageInput.js.map +1 -1
  42. package/lib/commonjs/components/MessageItem.js +17 -8
  43. package/lib/commonjs/components/MessageItem.js.map +1 -1
  44. package/lib/commonjs/constants/translations.js +174 -29
  45. package/lib/commonjs/constants/translations.js.map +1 -1
  46. package/lib/commonjs/data/fake/media.js +105 -0
  47. package/lib/commonjs/data/fake/media.js.map +1 -0
  48. package/lib/commonjs/types/MediaTypes.js +2 -0
  49. package/lib/commonjs/types/MediaTypes.js.map +1 -0
  50. package/lib/commonjs/version.js +1 -1
  51. package/lib/commonjs/version.js.map +1 -1
  52. package/lib/module/NativeComnyxMediaPicker.js +73 -0
  53. package/lib/module/NativeComnyxMediaPicker.js.map +1 -0
  54. package/lib/module/api/index.js +1 -0
  55. package/lib/module/api/index.js.map +1 -1
  56. package/lib/module/api/media.js +70 -0
  57. package/lib/module/api/media.js.map +1 -0
  58. package/lib/module/assets/attachment-01.png +0 -0
  59. package/lib/module/assets/gallery.png +0 -0
  60. package/lib/module/assets/video-play.png +0 -0
  61. package/lib/module/assets/x-circle.png +0 -0
  62. package/lib/module/components/ChatList.js +48 -22
  63. package/lib/module/components/ChatList.js.map +1 -1
  64. package/lib/module/components/LinkifyText.js +5 -1
  65. package/lib/module/components/LinkifyText.js.map +1 -1
  66. package/lib/module/components/MediaMessageItem.js +330 -0
  67. package/lib/module/components/MediaMessageItem.js.map +1 -0
  68. package/lib/module/components/MediaPickerButton.js +240 -0
  69. package/lib/module/components/MediaPickerButton.js.map +1 -0
  70. package/lib/module/components/MediaViewerModal.js +160 -0
  71. package/lib/module/components/MediaViewerModal.js.map +1 -0
  72. package/lib/module/components/MessageInput.js +347 -75
  73. package/lib/module/components/MessageInput.js.map +1 -1
  74. package/lib/module/components/MessageItem.js +17 -8
  75. package/lib/module/components/MessageItem.js.map +1 -1
  76. package/lib/module/constants/translations.js +174 -29
  77. package/lib/module/constants/translations.js.map +1 -1
  78. package/lib/module/data/fake/media.js +99 -0
  79. package/lib/module/data/fake/media.js.map +1 -0
  80. package/lib/module/types/MediaTypes.js +2 -0
  81. package/lib/module/types/MediaTypes.js.map +1 -0
  82. package/lib/module/version.js +1 -1
  83. package/lib/module/version.js.map +1 -1
  84. package/lib/typescript/src/NativeComnyxMediaPicker.d.ts +9 -0
  85. package/lib/typescript/src/NativeComnyxMediaPicker.d.ts.map +1 -0
  86. package/lib/typescript/src/api/index.d.ts +1 -0
  87. package/lib/typescript/src/api/index.d.ts.map +1 -1
  88. package/lib/typescript/src/api/media.d.ts +7 -0
  89. package/lib/typescript/src/api/media.d.ts.map +1 -0
  90. package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
  91. package/lib/typescript/src/components/LinkifyText.d.ts.map +1 -1
  92. package/lib/typescript/src/components/MediaMessageItem.d.ts +6 -0
  93. package/lib/typescript/src/components/MediaMessageItem.d.ts.map +1 -0
  94. package/lib/typescript/src/components/MediaPickerButton.d.ts +5 -0
  95. package/lib/typescript/src/components/MediaPickerButton.d.ts.map +1 -0
  96. package/lib/typescript/src/components/MediaViewerModal.d.ts +8 -0
  97. package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -0
  98. package/lib/typescript/src/components/MessageInput.d.ts.map +1 -1
  99. package/lib/typescript/src/components/MessageItem.d.ts.map +1 -1
  100. package/lib/typescript/src/constants/translations.d.ts.map +1 -1
  101. package/lib/typescript/src/data/fake/media.d.ts +6 -0
  102. package/lib/typescript/src/data/fake/media.d.ts.map +1 -0
  103. package/lib/typescript/src/types/Conversation.d.ts +19 -0
  104. package/lib/typescript/src/types/Conversation.d.ts.map +1 -1
  105. package/lib/typescript/src/types/LocalizationKeys.d.ts +5 -0
  106. package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -1
  107. package/lib/typescript/src/types/MediaTypes.d.ts +26 -0
  108. package/lib/typescript/src/types/MediaTypes.d.ts.map +1 -0
  109. package/lib/typescript/src/version.d.ts +1 -1
  110. package/lib/typescript/src/version.d.ts.map +1 -1
  111. package/package.json +1 -1
  112. package/src/NativeComnyxMediaPicker.ts +83 -0
  113. package/src/api/index.ts +1 -0
  114. package/src/api/media.ts +116 -0
  115. package/src/assets/attachment-01.png +0 -0
  116. package/src/assets/gallery.png +0 -0
  117. package/src/assets/video-play.png +0 -0
  118. package/src/assets/x-circle.png +0 -0
  119. package/src/components/ChatList.tsx +81 -24
  120. package/src/components/CustomerForm.tsx +1 -1
  121. package/src/components/LinkifyText.tsx +3 -2
  122. package/src/components/MediaMessageItem.tsx +390 -0
  123. package/src/components/MediaPickerButton.tsx +269 -0
  124. package/src/components/MediaViewerModal.tsx +168 -0
  125. package/src/components/MessageInput.tsx +396 -84
  126. package/src/components/MessageItem.tsx +19 -5
  127. package/src/constants/translations.ts +145 -0
  128. package/src/data/fake/media.ts +110 -0
  129. package/src/types/Conversation.ts +20 -0
  130. package/src/types/LocalizationKeys.ts +5 -0
  131. package/src/types/MediaTypes.ts +27 -0
  132. package/src/version.ts +1 -1
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
+ #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
+ #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
+ #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
+ #else
16
+ #import "RCTDependencyProvider.h"
17
+ #endif
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
+
23
+ @end
24
+
25
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTAppDependencyProvider.h"
9
+ #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
+ #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
+
12
+ @implementation RCTAppDependencyProvider {
13
+ NSArray<NSString *> * _URLRequestHandlerClassNames;
14
+ NSArray<NSString *> * _imageDataDecoderClassNames;
15
+ NSArray<NSString *> * _imageURLLoaderClassNames;
16
+ NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
17
+ }
18
+
19
+ - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
20
+ static dispatch_once_t requestUrlToken;
21
+ dispatch_once(&requestUrlToken, ^{
22
+ self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
23
+ });
24
+
25
+ return _URLRequestHandlerClassNames;
26
+ }
27
+
28
+ - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
29
+ static dispatch_once_t dataDecoderToken;
30
+ dispatch_once(&dataDecoderToken, ^{
31
+ _imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
32
+ });
33
+
34
+ return _imageDataDecoderClassNames;
35
+ }
36
+
37
+ - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
38
+ static dispatch_once_t urlLoaderToken;
39
+ dispatch_once(&urlLoaderToken, ^{
40
+ _imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
41
+ });
42
+
43
+ return _imageURLLoaderClassNames;
44
+ }
45
+
46
+ - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
47
+ static dispatch_once_t nativeComponentsToken;
48
+ dispatch_once(&nativeComponentsToken, ^{
49
+ _thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
50
+ });
51
+
52
+ return _thirdPartyFabricComponents;
53
+ }
54
+
55
+ @end
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTModulesConformingToProtocolsProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
+
14
+ +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
+
16
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
+
18
+ @end
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTModulesConformingToProtocolsProvider.h"
9
+
10
+ @implementation RCTModulesConformingToProtocolsProvider
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames
13
+ {
14
+ return @[
15
+
16
+ ];
17
+ }
18
+
19
+ +(NSArray<NSString *> *)imageDataDecoderClassNames
20
+ {
21
+ return @[
22
+
23
+ ];
24
+ }
25
+
26
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames
27
+ {
28
+ return @[
29
+
30
+ ];
31
+ }
32
+
33
+ @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTComponentViewProtocol;
11
+
12
+ @interface RCTThirdPartyComponentsProvider: NSObject
13
+
14
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
+
16
+ @end
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #import "RCTThirdPartyComponentsProvider.h"
12
+ #import <React/RCTComponentViewProtocol.h>
13
+
14
+ @implementation RCTThirdPartyComponentsProvider
15
+
16
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
+ {
18
+ return @{
19
+
20
+ };
21
+ }
22
+
23
+ @end
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ version = "0.78.1"
7
+ source = { :git => 'https://github.com/facebook/react-native.git' }
8
+ if version == '1000.0.0'
9
+ # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
+ source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
+ else
12
+ source[:tag] = "v#{version}"
13
+ end
14
+
15
+ Pod::Spec.new do |s|
16
+ s.name = "ReactAppDependencyProvider"
17
+ s.version = version
18
+ s.summary = "The third party dependency provider for the app"
19
+ s.homepage = "https://reactnative.dev/"
20
+ s.documentation_url = "https://reactnative.dev/"
21
+ s.license = "MIT"
22
+ s.author = "Meta Platforms, Inc. and its affiliates"
23
+ s.platforms = min_supported_versions
24
+ s.source = source
25
+ s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
+
27
+ # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
+ s.pod_target_xcconfig = {
29
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
+ "DEFINES_MODULE" => "YES"
31
+ }
32
+
33
+ s.dependency "ReactCodegen"
34
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNComnyxSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNComnyxSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNComnyxSpec PUBLIC . react/renderer/components/RNComnyxSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNComnyxSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNComnyxSpec
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,22 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RNComnyxSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+
16
+
17
+ std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
18
+
19
+ return nullptr;
20
+ }
21
+
22
+ } // namespace facebook::react
@@ -0,0 +1,24 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+
20
+
21
+ JSI_EXPORT
22
+ std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
23
+
24
+ } // namespace facebook::react
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "RNComnyxSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+
15
+
16
+
17
+ } // namespace facebook::react
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+
19
+ } // namespace facebook::react
@@ -1,3 +1,18 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
2
  package="com.comnyx">
3
+
4
+ <application>
5
+ <service
6
+ android:name="com.comnyx.messaging.ComnyxFirebaseMessagingService"
7
+ android:priority="-1500"
8
+ android:exported="true">
9
+ <intent-filter>
10
+ <action android:name="com.google.firebase.MESSAGING_EVENT" />
11
+ </intent-filter>
12
+ </service>
13
+ <activity
14
+ android:name="com.comnyx.VideoPlayerActivity"
15
+ android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
16
+ android:exported="false" />
17
+ </application>
3
18
  </manifest>
@@ -8,5 +8,9 @@
8
8
  <action android:name="com.google.firebase.MESSAGING_EVENT" />
9
9
  </intent-filter>
10
10
  </service>
11
+ <activity
12
+ android:name="com.comnyx.VideoPlayerActivity"
13
+ android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
14
+ android:exported="false" />
11
15
  </application>
12
16
  </manifest>