@developer_tribe/react-native-comnyx 0.7.2 → 0.7.4

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 (53) hide show
  1. package/android/build.gradle +12 -0
  2. package/android/generated/java/com/comnyx/NativeComnyxSpec.java +37 -0
  3. package/android/generated/jni/RNComnyxSpec-generated.cpp +11 -1
  4. package/android/generated/jni/RNComnyxSpec.h +7 -0
  5. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +11 -0
  6. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +52 -0
  7. package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +39 -0
  8. package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +63 -0
  9. package/ios/generated/RNComnyxSpecJSI-generated.cpp +28 -0
  10. package/ios/generated/RNComnyxSpecJSI.h +71 -0
  11. package/lib/commonjs/components/ChatList.js +106 -100
  12. package/lib/commonjs/components/ChatList.js.map +1 -1
  13. package/lib/commonjs/components/CustomerForm.js +179 -173
  14. package/lib/commonjs/components/CustomerForm.js.map +1 -1
  15. package/lib/commonjs/components/EmptyList.js +7 -5
  16. package/lib/commonjs/components/EmptyList.js.map +1 -1
  17. package/lib/module/components/ChatList.js +107 -101
  18. package/lib/module/components/ChatList.js.map +1 -1
  19. package/lib/module/components/CustomerForm.js +180 -174
  20. package/lib/module/components/CustomerForm.js.map +1 -1
  21. package/lib/module/components/EmptyList.js +8 -6
  22. package/lib/module/components/EmptyList.js.map +1 -1
  23. package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
  24. package/lib/typescript/src/components/CustomerForm.d.ts.map +1 -1
  25. package/lib/typescript/src/components/EmptyList.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/ChatList.tsx +123 -110
  28. package/src/components/CustomerForm.tsx +212 -194
  29. package/src/components/EmptyList.tsx +10 -3
  30. package/android/app/build/generated/source/codegen/RCTAppDependencyProvider.h +0 -25
  31. package/android/app/build/generated/source/codegen/RCTAppDependencyProvider.mm +0 -55
  32. package/android/app/build/generated/source/codegen/RCTModulesConformingToProtocolsProvider.h +0 -18
  33. package/android/app/build/generated/source/codegen/RCTModulesConformingToProtocolsProvider.mm +0 -33
  34. package/android/app/build/generated/source/codegen/RCTThirdPartyComponentsProvider.h +0 -16
  35. package/android/app/build/generated/source/codegen/RCTThirdPartyComponentsProvider.mm +0 -23
  36. package/android/app/build/generated/source/codegen/ReactAppDependencyProvider.podspec +0 -34
  37. package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeAsyncStorageModuleSpec.java +0 -59
  38. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
  39. package/android/app/build/generated/source/codegen/jni/RNComnyxSpec-generated.cpp +0 -22
  40. package/android/app/build/generated/source/codegen/jni/RNComnyxSpec.h +0 -24
  41. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +0 -17
  42. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +0 -19
  43. package/android/app/build/generated/source/codegen/jni/react/renderer/components/rnasyncstorage/rnasyncstorageJSI-generated.cpp +0 -72
  44. package/android/app/build/generated/source/codegen/jni/react/renderer/components/rnasyncstorage/rnasyncstorageJSI.h +0 -116
  45. package/android/app/build/generated/source/codegen/jni/rnasyncstorage-generated.cpp +0 -62
  46. package/android/app/build/generated/source/codegen/jni/rnasyncstorage.h +0 -31
  47. package/android/generated/RCTAppDependencyProvider.h +0 -25
  48. package/android/generated/RCTAppDependencyProvider.mm +0 -55
  49. package/android/generated/RCTModulesConformingToProtocolsProvider.h +0 -18
  50. package/android/generated/RCTModulesConformingToProtocolsProvider.mm +0 -33
  51. package/android/generated/RCTThirdPartyComponentsProvider.h +0 -16
  52. package/android/generated/RCTThirdPartyComponentsProvider.mm +0 -23
  53. package/android/generated/ReactAppDependencyProvider.podspec +0 -34
@@ -15,6 +15,18 @@ buildscript {
15
15
  }
16
16
  }
17
17
 
18
+ allprojects {
19
+ configurations.all {
20
+ resolutionStrategy {
21
+ force 'com.google.android.gms:play-services-measurement-api:21.5.0'
22
+ force 'com.google.android.gms:play-services-measurement-impl:21.5.0'
23
+ force 'com.google.android.gms:play-services-measurement-base:21.5.0'
24
+ force 'com.google.android.gms:play-services-measurement-sdk:21.5.0'
25
+ force 'com.google.android.gms:play-services-measurement-sdk-api:21.5.0'
26
+ force 'com.google.android.gms:play-services-measurement:21.5.0'
27
+ }
28
+ }
29
+ }
18
30
 
19
31
  apply plugin: "com.android.library"
20
32
  apply plugin: "kotlin-android"
@@ -0,0 +1,37 @@
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: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.comnyx;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.ReactApplicationContext;
17
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
18
+ import com.facebook.react.bridge.ReactMethod;
19
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
20
+ import javax.annotation.Nonnull;
21
+
22
+ public abstract class NativeComnyxSpec extends ReactContextBaseJavaModule implements TurboModule {
23
+ public static final String NAME = "Comnyx";
24
+
25
+ public NativeComnyxSpec(ReactApplicationContext reactContext) {
26
+ super(reactContext);
27
+ }
28
+
29
+ @Override
30
+ public @Nonnull String getName() {
31
+ return NAME;
32
+ }
33
+
34
+ @ReactMethod(isBlockingSynchronousMethod = true)
35
+ @DoNotStrip
36
+ public abstract double multiply(double a, double b);
37
+ }
@@ -12,10 +12,20 @@
12
12
 
13
13
  namespace facebook::react {
14
14
 
15
+ static facebook::jsi::Value __hostFunction_NativeComnyxSpecJSI_multiply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, NumberKind, "multiply", "(DD)D", args, count, cachedMethodId);
18
+ }
15
19
 
20
+ NativeComnyxSpecJSI::NativeComnyxSpecJSI(const JavaTurboModule::InitParams &params)
21
+ : JavaTurboModule(params) {
22
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxSpecJSI_multiply};
23
+ }
16
24
 
17
25
  std::shared_ptr<TurboModule> RNComnyxSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
18
-
26
+ if (moduleName == "Comnyx") {
27
+ return std::make_shared<NativeComnyxSpecJSI>(params);
28
+ }
19
29
  return nullptr;
20
30
  }
21
31
 
@@ -16,6 +16,13 @@
16
16
 
17
17
  namespace facebook::react {
18
18
 
19
+ /**
20
+ * JNI C++ class for module 'NativeComnyx'
21
+ */
22
+ class JSI_EXPORT NativeComnyxSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeComnyxSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
19
26
 
20
27
 
21
28
  JSI_EXPORT
@@ -11,7 +11,18 @@
11
11
 
12
12
  namespace facebook::react {
13
13
 
14
+ static jsi::Value __hostFunction_NativeComnyxCxxSpecJSI_multiply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeComnyxCxxSpecJSI *>(&turboModule)->multiply(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
18
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
19
+ );
20
+ }
14
21
 
22
+ NativeComnyxCxxSpecJSI::NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
23
+ : TurboModule("Comnyx", jsInvoker) {
24
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxCxxSpecJSI_multiply};
25
+ }
15
26
 
16
27
 
17
28
  } // namespace facebook::react
@@ -15,5 +15,57 @@
15
15
  namespace facebook::react {
16
16
 
17
17
 
18
+ class JSI_EXPORT NativeComnyxCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual double multiply(jsi::Runtime &rt, double a, double b) = 0;
24
+
25
+ };
26
+
27
+ template <typename T>
28
+ class JSI_EXPORT NativeComnyxCxxSpec : public TurboModule {
29
+ public:
30
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
31
+ return delegate_.create(rt, propName);
32
+ }
33
+
34
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
35
+ return delegate_.getPropertyNames(runtime);
36
+ }
37
+
38
+ static constexpr std::string_view kModuleName = "Comnyx";
39
+
40
+ protected:
41
+ NativeComnyxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
42
+ : TurboModule(std::string{NativeComnyxCxxSpec::kModuleName}, jsInvoker),
43
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
44
+
45
+
46
+ private:
47
+ class Delegate : public NativeComnyxCxxSpecJSI {
48
+ public:
49
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
50
+ NativeComnyxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
51
+
52
+ }
53
+
54
+ double multiply(jsi::Runtime &rt, double a, double b) override {
55
+ static_assert(
56
+ bridging::getParameterCount(&T::multiply) == 3,
57
+ "Expected multiply(...) to have 3 parameters");
58
+
59
+ return bridging::callFromJs<double>(
60
+ rt, &T::multiply, jsInvoker_, instance_, std::move(a), std::move(b));
61
+ }
62
+
63
+ private:
64
+ friend class NativeComnyxCxxSpec;
65
+ T *instance_;
66
+ };
67
+
68
+ Delegate delegate_;
69
+ };
18
70
 
19
71
  } // namespace facebook::react
@@ -0,0 +1,39 @@
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: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "RNComnyxSpec.h"
15
+
16
+
17
+ @implementation NativeComnyxSpecBase
18
+
19
+
20
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
21
+ {
22
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
23
+ }
24
+ @end
25
+
26
+
27
+ namespace facebook::react {
28
+
29
+ static facebook::jsi::Value __hostFunction_NativeComnyxSpecJSI_multiply(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
30
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, NumberKind, "multiply", @selector(multiply:b:), args, count);
31
+ }
32
+
33
+ NativeComnyxSpecJSI::NativeComnyxSpecJSI(const ObjCTurboModule::InitParams &params)
34
+ : ObjCTurboModule(params) {
35
+
36
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxSpecJSI_multiply};
37
+
38
+ }
39
+ } // namespace facebook::react
@@ -0,0 +1,63 @@
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: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of RNComnyxSpec symbols
19
+ #ifndef RNComnyxSpec_H
20
+ #define RNComnyxSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeComnyxSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (NSNumber *)multiply:(double)a
39
+ b:(double)b;
40
+
41
+ @end
42
+
43
+ @interface NativeComnyxSpecBase : NSObject {
44
+ @protected
45
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
46
+ }
47
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
48
+
49
+
50
+ @end
51
+
52
+ namespace facebook::react {
53
+ /**
54
+ * ObjC++ class for module 'NativeComnyx'
55
+ */
56
+ class JSI_EXPORT NativeComnyxSpecJSI : public ObjCTurboModule {
57
+ public:
58
+ NativeComnyxSpecJSI(const ObjCTurboModule::InitParams &params);
59
+ };
60
+ } // namespace facebook::react
61
+
62
+ NS_ASSUME_NONNULL_END
63
+ #endif // RNComnyxSpec_H
@@ -0,0 +1,28 @@
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
+ static jsi::Value __hostFunction_NativeComnyxCxxSpecJSI_multiply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ return static_cast<NativeComnyxCxxSpecJSI *>(&turboModule)->multiply(
16
+ rt,
17
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
18
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber()
19
+ );
20
+ }
21
+
22
+ NativeComnyxCxxSpecJSI::NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
23
+ : TurboModule("Comnyx", jsInvoker) {
24
+ methodMap_["multiply"] = MethodMetadata {2, __hostFunction_NativeComnyxCxxSpecJSI_multiply};
25
+ }
26
+
27
+
28
+ } // namespace facebook::react
@@ -0,0 +1,71 @@
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
+ class JSI_EXPORT NativeComnyxCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeComnyxCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual double multiply(jsi::Runtime &rt, double a, double b) = 0;
24
+
25
+ };
26
+
27
+ template <typename T>
28
+ class JSI_EXPORT NativeComnyxCxxSpec : public TurboModule {
29
+ public:
30
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
31
+ return delegate_.create(rt, propName);
32
+ }
33
+
34
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
35
+ return delegate_.getPropertyNames(runtime);
36
+ }
37
+
38
+ static constexpr std::string_view kModuleName = "Comnyx";
39
+
40
+ protected:
41
+ NativeComnyxCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
42
+ : TurboModule(std::string{NativeComnyxCxxSpec::kModuleName}, jsInvoker),
43
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
44
+
45
+
46
+ private:
47
+ class Delegate : public NativeComnyxCxxSpecJSI {
48
+ public:
49
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
50
+ NativeComnyxCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
51
+
52
+ }
53
+
54
+ double multiply(jsi::Runtime &rt, double a, double b) override {
55
+ static_assert(
56
+ bridging::getParameterCount(&T::multiply) == 3,
57
+ "Expected multiply(...) to have 3 parameters");
58
+
59
+ return bridging::callFromJs<double>(
60
+ rt, &T::multiply, jsInvoker_, instance_, std::move(a), std::move(b));
61
+ }
62
+
63
+ private:
64
+ friend class NativeComnyxCxxSpec;
65
+ T *instance_;
66
+ };
67
+
68
+ Delegate delegate_;
69
+ };
70
+
71
+ } // namespace facebook::react
@@ -449,114 +449,120 @@ function ChatList({
449
449
  backgroundColor: themeColors.background,
450
450
  animated: false,
451
451
  translucent: true
452
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
453
- style: [styles.container, {
454
- backgroundColor: themeColors.background
455
- }],
456
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
457
- style: [styles.iconContainer],
458
- onPress: onBack,
459
- activeOpacity: _activeOpacity.activeOpacity,
460
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
461
- source: closeIcon,
462
- style: [styles.closeIcon, {
463
- tintColor: themeColors.text
464
- }]
465
- })
466
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
467
- style: [styles.headerContainer, {
468
- backgroundColor: themeColors.background,
469
- borderBottomColor: themeColors.lavender
452
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView, {
453
+ behavior: _reactNative.Platform.OS === 'ios' ? 'padding' : 'height',
454
+ style: {
455
+ flex: 1
456
+ },
457
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
458
+ style: [styles.container, {
459
+ backgroundColor: themeColors.background
470
460
  }],
471
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
472
- localization: "chat.support-team",
473
- weight: '600',
474
- style: [styles.header, {
475
- color: themeColors.text
476
- }]
477
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
478
- style: [styles.headerText, {
479
- backgroundColor: themeColors.background
480
- }],
481
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
482
- source: headphonesIcon,
483
- style: [styles.headphonesIcon, {
461
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
462
+ style: [styles.iconContainer],
463
+ onPress: onBack,
464
+ activeOpacity: _activeOpacity.activeOpacity,
465
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
466
+ source: closeIcon,
467
+ style: [styles.closeIcon, {
484
468
  tintColor: themeColors.text
485
469
  }]
486
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
487
- localization: "chat.live",
488
- style: [styles.liveChat, {
470
+ })
471
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
472
+ style: [styles.headerContainer, {
473
+ backgroundColor: themeColors.background,
474
+ borderBottomColor: themeColors.lavender
475
+ }],
476
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
477
+ localization: "chat.support-team",
478
+ weight: '600',
479
+ style: [styles.header, {
489
480
  color: themeColors.text
490
481
  }]
491
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
492
- style: [styles.dot, {
493
- backgroundColor: themeColors.green
494
- }]
482
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
483
+ style: [styles.headerText, {
484
+ backgroundColor: themeColors.background
485
+ }],
486
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
487
+ source: headphonesIcon,
488
+ style: [styles.headphonesIcon, {
489
+ tintColor: themeColors.text
490
+ }]
491
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
492
+ localization: "chat.live",
493
+ style: [styles.liveChat, {
494
+ color: themeColors.text
495
+ }]
496
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
497
+ style: [styles.dot, {
498
+ backgroundColor: themeColors.green
499
+ }]
500
+ })]
495
501
  })]
496
- })]
497
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
498
- style: styles.listContainer,
499
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
500
- style: [styles.dateText, {
501
- color: themeColors.slate,
502
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
503
+ style: styles.listContainer,
504
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppText.AppText, {
505
+ style: [styles.dateText, {
506
+ color: themeColors.slate,
507
+ backgroundColor: themeColors.ghost
508
+ }],
509
+ children: currentSection
510
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.SectionList, {
511
+ ref: ref,
512
+ sections: sections,
513
+ inverted: true,
514
+ renderItem: renderItem,
515
+ contentContainerStyle: [styles.contentContainer, {
516
+ backgroundColor: themeColors.background
517
+ }],
518
+ style: styles.list,
519
+ ListEmptyComponent: !loading && (!sections || sections.length === 0) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyList.EmptyList, {}) : null,
520
+ ListFooterComponent: loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(LoadingItem, {}) : null,
521
+ keyExtractor: item => item.id + '-' + item.created_at,
522
+ removeClippedSubviews: false,
523
+ maxToRenderPerBatch: 20,
524
+ windowSize: 21,
525
+ initialNumToRender: MESSAGES_PER_PAGE,
526
+ getItemLayout: (_, index) => ({
527
+ length: MESSAGE_MIN_HEIGHT + 10,
528
+ offset: (MESSAGE_MIN_HEIGHT + 10) * index,
529
+ index
530
+ }),
531
+ onScroll: handleScroll,
532
+ scrollEventThrottle: 1,
533
+ stickySectionHeadersEnabled: false,
534
+ showsVerticalScrollIndicator: false
535
+ })]
536
+ }), isScrollingUp && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
537
+ activeOpacity: _activeOpacity.activeOpacity,
538
+ style: [styles.scrollDownButton, {
502
539
  backgroundColor: themeColors.ghost
503
- }],
504
- children: currentSection
505
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.SectionList, {
506
- ref: ref,
507
- sections: sections,
508
- inverted: true,
509
- renderItem: renderItem,
510
- contentContainerStyle: [styles.contentContainer, {
511
- backgroundColor: themeColors.background
512
- }],
513
- style: styles.list,
514
- ListEmptyComponent: !loading && (!sections || sections.length === 0) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyList.EmptyList, {}) : null,
515
- ListFooterComponent: loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(LoadingItem, {}) : null,
516
- keyExtractor: item => item.id + '-' + item.created_at,
517
- removeClippedSubviews: false,
518
- maxToRenderPerBatch: 20,
519
- windowSize: 21,
520
- initialNumToRender: MESSAGES_PER_PAGE,
521
- getItemLayout: (_, index) => ({
522
- length: MESSAGE_MIN_HEIGHT + 10,
523
- offset: (MESSAGE_MIN_HEIGHT + 10) * index,
524
- index
525
- }),
526
- onScroll: handleScroll,
527
- scrollEventThrottle: 1,
528
- stickySectionHeadersEnabled: false,
529
- showsVerticalScrollIndicator: false
540
+ }, isKeyboardVisible && styles.scrollDownButtonWithKeyboard],
541
+ onPress: () => scrollToBottom(true),
542
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
543
+ source: require('../assets/down.png'),
544
+ style: [styles.scrollUpIcon, {
545
+ tintColor: themeColors.text
546
+ }]
547
+ })
548
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageInput.MessageInput, {
549
+ scrollToBottom: scrollToBottom,
550
+ selectedMessage: selectedMessage
551
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomAlert.default, {
552
+ isVisible: popupVisible,
553
+ onClose: () => setPopupVisible(false),
554
+ title: 'chat.list-failed-message.title',
555
+ description: 'chat.list-failed-message.description',
556
+ onCancelButton: () => {
557
+ setPopupVisible(false);
558
+ },
559
+ onResendButton: () => {
560
+ resendMessage();
561
+ setPopupVisible(false);
562
+ },
563
+ buttonText: 'chat.list-cancel'
530
564
  })]
531
- }), isScrollingUp && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
532
- activeOpacity: _activeOpacity.activeOpacity,
533
- style: [styles.scrollDownButton, {
534
- backgroundColor: themeColors.ghost
535
- }, isKeyboardVisible && styles.scrollDownButtonWithKeyboard],
536
- onPress: () => scrollToBottom(true),
537
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
538
- source: require('../assets/down.png'),
539
- style: [styles.scrollUpIcon, {
540
- tintColor: themeColors.text
541
- }]
542
- })
543
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageInput.MessageInput, {
544
- scrollToBottom: scrollToBottom,
545
- selectedMessage: selectedMessage
546
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomAlert.default, {
547
- isVisible: popupVisible,
548
- onClose: () => setPopupVisible(false),
549
- title: 'chat.list-failed-message.title',
550
- description: 'chat.list-failed-message.description',
551
- onCancelButton: () => {
552
- setPopupVisible(false);
553
- },
554
- onResendButton: () => {
555
- resendMessage();
556
- setPopupVisible(false);
557
- },
558
- buttonText: 'chat.list-cancel'
559
- })]
565
+ })
560
566
  })]
561
567
  });
562
568
  }