@developer_tribe/react-native-comnyx 0.15.0 → 0.16.1
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/Comnyx.podspec +10 -2
- package/README.md +50 -0
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +23 -0
- package/android/generated/java/com/comnyx/NativeComnyxSpec.java +46 -0
- package/android/generated/jni/RNComnyxSpec-generated.cpp +23 -1
- package/android/generated/jni/RNComnyxSpec.h +7 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +21 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +70 -0
- package/android/src/main/AndroidManifest.xml +11 -1
- package/android/src/main/AndroidManifestNew.xml +11 -1
- package/android/src/main/java/com/comnyx/ComnyxMediaPickerModule.kt +91 -51
- package/android/src/main/java/com/comnyx/ComnyxModule.kt +7 -0
- package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +4 -6
- package/android/src/main/res/xml/comnyx_file_paths.xml +12 -0
- package/ios/APNService.swift +9 -9
- package/ios/Comnyx.swift +17 -8
- package/ios/ComnyxMediaPicker.swift +47 -26
- package/ios/ComnyxMessaging.swift +2 -0
- package/ios/PrivacyInfo.xcprivacy +32 -0
- package/ios/comnyx_post_install.rb +25 -0
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +53 -0
- package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +67 -0
- package/ios/generated/RNComnyxSpecJSI-generated.cpp +38 -0
- package/ios/generated/RNComnyxSpecJSI.h +89 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js +19 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js.map +1 -1
- package/lib/commonjs/api/conversations.js +6 -6
- package/lib/commonjs/api/conversations.js.map +1 -1
- package/lib/commonjs/api/customers.js +3 -2
- package/lib/commonjs/api/customers.js.map +1 -1
- package/lib/commonjs/api/media.js +20 -6
- package/lib/commonjs/api/media.js.map +1 -1
- package/lib/commonjs/api/messages.js +3 -2
- package/lib/commonjs/api/messages.js.map +1 -1
- package/lib/commonjs/components/ChatList.js +132 -90
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/ComnyxErrorBoundary.js +92 -0
- package/lib/commonjs/components/ComnyxErrorBoundary.js.map +1 -0
- package/lib/commonjs/components/CustomerForm.js +7 -3
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/InitFailed.js +77 -21
- package/lib/commonjs/components/InitFailed.js.map +1 -1
- package/lib/commonjs/components/MediaMessageItem.js +37 -10
- package/lib/commonjs/components/MediaMessageItem.js.map +1 -1
- package/lib/commonjs/components/MediaViewerModal.js +16 -3
- package/lib/commonjs/components/MediaViewerModal.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +83 -15
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +1 -1
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/hooks/usePolling.js +30 -21
- package/lib/commonjs/hooks/usePolling.js.map +1 -1
- package/lib/commonjs/hooks/useThemeColors.js +12 -1
- package/lib/commonjs/hooks/useThemeColors.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/initializeNotifications.js +19 -16
- package/lib/commonjs/notifications/initializeNotifications.js.map +1 -1
- package/lib/commonjs/register/Accumulator.js +19 -6
- package/lib/commonjs/register/Accumulator.js.map +1 -1
- package/lib/commonjs/register/collectData.js +1 -1
- package/lib/commonjs/register/collectData.js.map +1 -1
- package/lib/commonjs/register/login.js +5 -0
- package/lib/commonjs/register/login.js.map +1 -1
- package/lib/commonjs/store/store.js +6 -0
- package/lib/commonjs/store/store.js.map +1 -1
- package/lib/commonjs/support/ComnyxSupport.js +77 -16
- package/lib/commonjs/support/ComnyxSupport.js.map +1 -1
- package/lib/commonjs/support/SupportConfigContext.js +66 -0
- package/lib/commonjs/support/SupportConfigContext.js.map +1 -0
- package/lib/commonjs/support/index.js +7 -0
- package/lib/commonjs/support/index.js.map +1 -1
- package/lib/commonjs/types/Theme.js +30 -2
- package/lib/commonjs/types/Theme.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/NativeComnyxMediaPicker.js +18 -0
- package/lib/module/NativeComnyxMediaPicker.js.map +1 -1
- package/lib/module/api/conversations.js +6 -6
- package/lib/module/api/conversations.js.map +1 -1
- package/lib/module/api/customers.js +3 -2
- package/lib/module/api/customers.js.map +1 -1
- package/lib/module/api/media.js +21 -6
- package/lib/module/api/media.js.map +1 -1
- package/lib/module/api/messages.js +3 -2
- package/lib/module/api/messages.js.map +1 -1
- package/lib/module/components/ChatList.js +133 -91
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/ComnyxErrorBoundary.js +87 -0
- package/lib/module/components/ComnyxErrorBoundary.js.map +1 -0
- package/lib/module/components/CustomerForm.js +7 -3
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/InitFailed.js +79 -23
- package/lib/module/components/InitFailed.js.map +1 -1
- package/lib/module/components/MediaMessageItem.js +37 -11
- package/lib/module/components/MediaMessageItem.js.map +1 -1
- package/lib/module/components/MediaViewerModal.js +15 -3
- package/lib/module/components/MediaViewerModal.js.map +1 -1
- package/lib/module/components/MessageInput.js +84 -16
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/components/MessageItem.js +1 -1
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/hooks/usePolling.js +30 -21
- package/lib/module/hooks/usePolling.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +13 -2
- package/lib/module/hooks/useThemeColors.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/initializeNotifications.js +19 -16
- package/lib/module/notifications/initializeNotifications.js.map +1 -1
- package/lib/module/register/Accumulator.js +19 -6
- package/lib/module/register/Accumulator.js.map +1 -1
- package/lib/module/register/collectData.js +1 -1
- package/lib/module/register/collectData.js.map +1 -1
- package/lib/module/register/login.js +5 -0
- package/lib/module/register/login.js.map +1 -1
- package/lib/module/store/store.js +6 -0
- package/lib/module/store/store.js.map +1 -1
- package/lib/module/support/ComnyxSupport.js +79 -18
- package/lib/module/support/ComnyxSupport.js.map +1 -1
- package/lib/module/support/SupportConfigContext.js +59 -0
- package/lib/module/support/SupportConfigContext.js.map +1 -0
- package/lib/module/support/index.js +1 -0
- package/lib/module/support/index.js.map +1 -1
- package/lib/module/types/Theme.js +30 -2
- package/lib/module/types/Theme.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts +9 -0
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts.map +1 -1
- package/lib/typescript/src/api/conversations.d.ts +2 -2
- package/lib/typescript/src/api/conversations.d.ts.map +1 -1
- package/lib/typescript/src/api/customers.d.ts +1 -1
- package/lib/typescript/src/api/customers.d.ts.map +1 -1
- package/lib/typescript/src/api/media.d.ts +3 -3
- package/lib/typescript/src/api/media.d.ts.map +1 -1
- package/lib/typescript/src/api/messages.d.ts +1 -1
- package/lib/typescript/src/api/messages.d.ts.map +1 -1
- package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts +18 -0
- package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomerForm.d.ts.map +1 -1
- package/lib/typescript/src/components/InitFailed.d.ts +5 -2
- package/lib/typescript/src/components/InitFailed.d.ts.map +1 -1
- package/lib/typescript/src/components/MediaMessageItem.d.ts.map +1 -1
- package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageInput.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageItem.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/notifications/initializeNotifications.d.ts.map +1 -1
- package/lib/typescript/src/register/Accumulator.d.ts.map +1 -1
- package/lib/typescript/src/register/collectData.d.ts +4 -1
- package/lib/typescript/src/register/collectData.d.ts.map +1 -1
- package/lib/typescript/src/register/login.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +6 -2
- package/lib/typescript/src/store/store.d.ts.map +1 -1
- package/lib/typescript/src/support/ComnyxSupport.d.ts +80 -3
- package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -1
- package/lib/typescript/src/support/SupportConfigContext.d.ts +98 -0
- package/lib/typescript/src/support/SupportConfigContext.d.ts.map +1 -0
- package/lib/typescript/src/support/index.d.ts +2 -0
- package/lib/typescript/src/support/index.d.ts.map +1 -1
- package/lib/typescript/src/types/Conversation.d.ts +2 -2
- package/lib/typescript/src/types/Conversation.d.ts.map +1 -1
- package/lib/typescript/src/types/Customer.d.ts +1 -1
- package/lib/typescript/src/types/Customer.d.ts.map +1 -1
- package/lib/typescript/src/types/MessageResponse.d.ts +7 -4
- package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -1
- package/lib/typescript/src/types/Theme.d.ts +26 -0
- package/lib/typescript/src/types/Theme.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +19 -30
- package/src/NativeComnyxMediaPicker.ts +18 -0
- package/src/api/conversations.ts +6 -4
- package/src/api/customers.ts +3 -1
- package/src/api/media.ts +32 -10
- package/src/api/messages.ts +3 -1
- package/src/components/ChatList.tsx +147 -99
- package/src/components/ComnyxErrorBoundary.tsx +91 -0
- package/src/components/CustomerForm.tsx +7 -3
- package/src/components/InitFailed.tsx +80 -16
- package/src/components/MediaMessageItem.tsx +48 -11
- package/src/components/MediaViewerModal.tsx +21 -8
- package/src/components/MessageInput.tsx +108 -17
- package/src/components/MessageItem.tsx +12 -13
- package/src/hooks/usePolling.ts +26 -11
- package/src/hooks/useThemeColors.ts +11 -2
- package/src/index.ts +16 -0
- package/src/notifications/initializeNotifications.ts +22 -20
- package/src/register/Accumulator.ts +26 -9
- package/src/register/collectData.ts +10 -2
- package/src/register/login.ts +5 -0
- package/src/store/store.ts +11 -3
- package/src/support/ComnyxSupport.tsx +172 -23
- package/src/support/SupportConfigContext.tsx +157 -0
- package/src/support/index.ts +11 -0
- package/src/types/Conversation.ts +2 -2
- package/src/types/Customer.ts +1 -2
- package/src/types/MessageResponse.ts +4 -4
- package/src/types/Theme.ts +38 -0
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axiosInstance","updateCustomer","customerData","externalId","console","info","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/customers.ts"],"mappings":";;AACA,SAASA,aAAa,QAAQ,UAAO;;AAErC;AACA,OAAO,SAASC,cAAcA,CAC5BC,YAAmC,EACnCC,UAAmB,
|
|
1
|
+
{"version":3,"names":["axiosInstance","updateCustomer","customerData","externalId","signal","console","info","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/customers.ts"],"mappings":";;AACA,SAASA,aAAa,QAAQ,UAAO;;AAErC;AACA,OAAO,SAASC,cAAcA,CAC5BC,YAAmC,EACnCC,UAAmB,EACnBC,MAAoB,EACa;EACjCC,OAAO,CAACC,IAAI,CAAC,+BAA+B,CAAC;EAC7C,OAAON,aAAa,CACjBO,IAAI,CAAC,uBAAuB,EAAEL,YAAY,EAAE;IAC3CM,OAAO,EAAE;MACP,aAAa,EAAEL;IACjB,CAAC;IACDC;EACF,CAAC,CAAC,CACDK,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC;AAC5B","ignoreList":[]}
|
package/lib/module/api/media.js
CHANGED
|
@@ -3,21 +3,34 @@
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { axiosInstance } from "./api.js";
|
|
5
5
|
import { getFakeUploadUrlResponse, fakeUploadToS3, getFakeMediaMessageResponse } from "../data/fake/media.js";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
// React Native's XMLHttpRequest.send accepts this shape to stream a file URI
|
|
8
|
+
// without loading it into memory. Not in lib.dom, so typed locally.
|
|
9
|
+
|
|
10
|
+
export function getUploadUrl(fileName, contentType, options, signal) {
|
|
7
11
|
if (options.fake) {
|
|
8
12
|
return getFakeUploadUrlResponse(fileName);
|
|
9
13
|
}
|
|
10
14
|
return axiosInstance.post('/api/media/presign', {
|
|
11
15
|
fileName,
|
|
12
16
|
fileType: contentType
|
|
17
|
+
}, {
|
|
18
|
+
signal
|
|
13
19
|
}).then(res => res.data);
|
|
14
20
|
}
|
|
15
|
-
export function uploadFileToS3(uploadUrl, fileUri, contentType, onProgress, options) {
|
|
21
|
+
export function uploadFileToS3(uploadUrl, fileUri, contentType, onProgress, options, signal) {
|
|
16
22
|
if (options?.fake) {
|
|
17
23
|
return fakeUploadToS3(onProgress);
|
|
18
24
|
}
|
|
19
25
|
return new Promise((resolve, reject) => {
|
|
26
|
+
if (signal?.aborted) {
|
|
27
|
+
reject(new Error('Upload aborted'));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
20
30
|
const xhr = new XMLHttpRequest();
|
|
31
|
+
const onAbort = () => xhr.abort();
|
|
32
|
+
signal?.addEventListener('abort', onAbort);
|
|
33
|
+
const cleanup = () => signal?.removeEventListener('abort', onAbort);
|
|
21
34
|
xhr.upload.addEventListener('progress', event => {
|
|
22
35
|
if (event.lengthComputable && onProgress) {
|
|
23
36
|
const percentage = Math.min(100, Math.round(event.loaded / event.total * 100));
|
|
@@ -25,6 +38,7 @@ export function uploadFileToS3(uploadUrl, fileUri, contentType, onProgress, opti
|
|
|
25
38
|
}
|
|
26
39
|
});
|
|
27
40
|
xhr.addEventListener('load', () => {
|
|
41
|
+
cleanup();
|
|
28
42
|
if (xhr.status >= 200 && xhr.status < 300) {
|
|
29
43
|
resolve();
|
|
30
44
|
} else {
|
|
@@ -33,16 +47,16 @@ export function uploadFileToS3(uploadUrl, fileUri, contentType, onProgress, opti
|
|
|
33
47
|
}
|
|
34
48
|
});
|
|
35
49
|
xhr.addEventListener('error', () => {
|
|
50
|
+
cleanup();
|
|
36
51
|
console.error('[Comnyx] Upload XHR error, status:', xhr.status, 'response:', xhr.responseText);
|
|
37
52
|
reject(new Error('Upload failed'));
|
|
38
53
|
});
|
|
39
54
|
xhr.addEventListener('abort', () => {
|
|
55
|
+
cleanup();
|
|
40
56
|
reject(new Error('Upload aborted'));
|
|
41
57
|
});
|
|
42
58
|
xhr.open('PUT', uploadUrl);
|
|
43
59
|
xhr.setRequestHeader('Content-Type', contentType);
|
|
44
|
-
|
|
45
|
-
// React Native supports sending file URIs directly via XHR
|
|
46
60
|
const file = {
|
|
47
61
|
uri: Platform.OS === 'android' ? fileUri : fileUri.replace('file://', ''),
|
|
48
62
|
type: contentType,
|
|
@@ -51,7 +65,7 @@ export function uploadFileToS3(uploadUrl, fileUri, contentType, onProgress, opti
|
|
|
51
65
|
xhr.send(file);
|
|
52
66
|
});
|
|
53
67
|
}
|
|
54
|
-
export function sendMediaMessage(externalId, fileUrls, mediaType, content, options) {
|
|
68
|
+
export function sendMediaMessage(externalId, fileUrls, mediaType, content, options, signal) {
|
|
55
69
|
if (options.fake) {
|
|
56
70
|
return getFakeMediaMessageResponse(fileUrls, mediaType);
|
|
57
71
|
}
|
|
@@ -64,7 +78,8 @@ export function sendMediaMessage(externalId, fileUrls, mediaType, content, optio
|
|
|
64
78
|
headers: {
|
|
65
79
|
'Accept': 'application/json',
|
|
66
80
|
'Content-Type': 'application/json'
|
|
67
|
-
}
|
|
81
|
+
},
|
|
82
|
+
signal
|
|
68
83
|
}).then(res => res.data);
|
|
69
84
|
}
|
|
70
85
|
//# sourceMappingURL=media.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","axiosInstance","getFakeUploadUrlResponse","fakeUploadToS3","getFakeMediaMessageResponse","getUploadUrl","fileName","contentType","options","fake","post","fileType","then","res","data","uploadFileToS3","uploadUrl","fileUri","onProgress","Promise","resolve","reject","xhr","XMLHttpRequest","
|
|
1
|
+
{"version":3,"names":["Platform","axiosInstance","getFakeUploadUrlResponse","fakeUploadToS3","getFakeMediaMessageResponse","getUploadUrl","fileName","contentType","options","signal","fake","post","fileType","then","res","data","uploadFileToS3","uploadUrl","fileUri","onProgress","Promise","resolve","reject","aborted","Error","xhr","XMLHttpRequest","onAbort","abort","addEventListener","cleanup","removeEventListener","upload","event","lengthComputable","percentage","Math","min","round","loaded","total","status","console","error","responseText","open","setRequestHeader","file","uri","OS","replace","type","name","split","pop","send","sendMediaMessage","externalId","fileUrls","mediaType","content","files","media_type","headers"],"sourceRoot":"../../../src","sources":["api/media.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { getFakeMessageResponse } from "../data/fake/messages.js";
|
|
4
4
|
import { axiosInstance } from "./api.js";
|
|
5
|
-
export function sendCustomerMessage(externalId, content, options) {
|
|
5
|
+
export function sendCustomerMessage(externalId, content, options, signal) {
|
|
6
6
|
if (options.fake) {
|
|
7
7
|
return new Promise((resolve, _) => {
|
|
8
8
|
setTimeout(() => {
|
|
@@ -17,7 +17,8 @@ export function sendCustomerMessage(externalId, content, options) {
|
|
|
17
17
|
headers: {
|
|
18
18
|
'Accept': 'application/json',
|
|
19
19
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
signal
|
|
21
22
|
}).then(res => res.data);
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getFakeMessageResponse","axiosInstance","sendCustomerMessage","externalId","content","options","fake","Promise","resolve","_","setTimeout","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/messages.ts"],"mappings":";;AAEA,SAASA,sBAAsB,QAAQ,0BAAuB;AAC9D,SAASC,aAAa,QAAQ,UAAO;AAErC,OAAO,SAASC,mBAAmBA,CACjCC,UAAkB,EAClBC,OAAe,EACfC,OAAmB,
|
|
1
|
+
{"version":3,"names":["getFakeMessageResponse","axiosInstance","sendCustomerMessage","externalId","content","options","signal","fake","Promise","resolve","_","setTimeout","post","headers","then","res","data"],"sourceRoot":"../../../src","sources":["api/messages.ts"],"mappings":";;AAEA,SAASA,sBAAsB,QAAQ,0BAAuB;AAC9D,SAASC,aAAa,QAAQ,UAAO;AAErC,OAAO,SAASC,mBAAmBA,CACjCC,UAAkB,EAClBC,OAAe,EACfC,OAAmB,EACnBC,MAAoB,EACM;EAC1B,IAAID,OAAO,CAACE,IAAI,EAAE;IAChB,OAAO,IAAIC,OAAO,CAAkB,CAACC,OAAO,EAAEC,CAAC,KAAK;MAClDC,UAAU,CAAC,MAAM;QACfF,OAAO,CAACT,sBAAsB,CAACI,OAAO,CAAC,CAAC;MAC1C,CAAC,EAAE,GAAG,CAAC;IACT,CAAC,CAAC;EACJ;EACA,OAAOH,aAAa,CACjBW,IAAI,CACH,wBAAwB,EACxB;IACET,UAAU;IACVC;EACF,CAAC,EACD;IACES,OAAO,EAAE;MACP,QAAQ,EAAE,kBAAkB;MAC5B,cAAc,EAAE;IAClB,CAAC;IACDP;EACF,CACF,CAAC,CACAQ,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC;AAC5B","ignoreList":[]}
|
|
@@ -15,7 +15,8 @@ import { ScaledSheet } from "./ScaledSheet.js";
|
|
|
15
15
|
import { formatDate, getDateKey } from "../utils/formatDate.js";
|
|
16
16
|
import { activeOpacity } from "../constants/activeOpacity.js";
|
|
17
17
|
import { useAppStore } from "../store/store.js";
|
|
18
|
-
import {
|
|
18
|
+
import { useSupportConfig, reportSupportError } from "../support/SupportConfigContext.js";
|
|
19
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
20
|
const headphonesIcon = require('../assets/headphones-01.png');
|
|
20
21
|
const closeIcon = require('../assets/x-close.png');
|
|
21
22
|
const VIDEO_EXTENSIONS = ['.mp4', '.mov', '.m4v', '.avi', '.webm', '.mkv', '.3gp'];
|
|
@@ -71,6 +72,7 @@ function CustomToast() {
|
|
|
71
72
|
} = useAppStore(s => ({
|
|
72
73
|
toastMessage: s.toastMessage
|
|
73
74
|
}));
|
|
75
|
+
const themeColors = useThemeColors();
|
|
74
76
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
75
77
|
const translateY = useRef(new Animated.Value(50)).current;
|
|
76
78
|
useEffect(() => {
|
|
@@ -106,9 +108,13 @@ function CustomToast() {
|
|
|
106
108
|
}]
|
|
107
109
|
}],
|
|
108
110
|
children: /*#__PURE__*/_jsx(View, {
|
|
109
|
-
style: styles.toastContent,
|
|
111
|
+
style: [styles.toastContent, {
|
|
112
|
+
backgroundColor: themeColors.toastBackground
|
|
113
|
+
}],
|
|
110
114
|
children: /*#__PURE__*/_jsx(AppText, {
|
|
111
|
-
style: styles.toastText,
|
|
115
|
+
style: [styles.toastText, {
|
|
116
|
+
color: themeColors.toastText
|
|
117
|
+
}],
|
|
112
118
|
localization: toastMessage
|
|
113
119
|
})
|
|
114
120
|
})
|
|
@@ -123,6 +129,12 @@ export function ChatList({
|
|
|
123
129
|
height: windowHeight
|
|
124
130
|
} = useWindowDimensions();
|
|
125
131
|
const insets = useSafeAreaInsets();
|
|
132
|
+
const {
|
|
133
|
+
renderHeader: renderHeaderOverride,
|
|
134
|
+
renderEmptyState: renderEmptyStateOverride,
|
|
135
|
+
renderErrorState: renderErrorStateOverride,
|
|
136
|
+
renderMessage: renderMessageOverride
|
|
137
|
+
} = useSupportConfig();
|
|
126
138
|
const MESSAGE_MIN_HEIGHT = 60;
|
|
127
139
|
const FLATLIST_PADDING = 20;
|
|
128
140
|
const MESSAGES_PER_PAGE = Math.ceil((windowHeight - FLATLIST_PADDING) / MESSAGE_MIN_HEIGHT);
|
|
@@ -130,20 +142,32 @@ export function ChatList({
|
|
|
130
142
|
useEffect(() => {
|
|
131
143
|
setLoading(l => l && initLoading);
|
|
132
144
|
}, [initLoading]);
|
|
145
|
+
const lifecycleAbortRef = useRef(null);
|
|
146
|
+
if (lifecycleAbortRef.current === null) {
|
|
147
|
+
lifecycleAbortRef.current = new AbortController();
|
|
148
|
+
}
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
const controller = lifecycleAbortRef.current;
|
|
151
|
+
return () => {
|
|
152
|
+
controller?.abort();
|
|
153
|
+
};
|
|
154
|
+
}, []);
|
|
133
155
|
const {
|
|
134
156
|
data,
|
|
135
157
|
setData,
|
|
136
158
|
customer,
|
|
137
|
-
language
|
|
159
|
+
language,
|
|
160
|
+
theme
|
|
138
161
|
} = useAppStore(s => ({
|
|
139
162
|
data: s.data,
|
|
140
163
|
setData: s.setData,
|
|
141
164
|
customer: s.customer,
|
|
142
|
-
language: s.language
|
|
165
|
+
language: s.language,
|
|
166
|
+
theme: s.theme
|
|
143
167
|
}));
|
|
144
168
|
const ref = useRef(null);
|
|
145
169
|
const [page, setPage] = useState(1);
|
|
146
|
-
const nextPageStatus = useRef();
|
|
170
|
+
const nextPageStatus = useRef(undefined);
|
|
147
171
|
const [nexPageFailed, setNexPageFailed] = useState(false);
|
|
148
172
|
const [initFailed, setInitFailed] = useState(false);
|
|
149
173
|
const [showScrollDownButton, setShowScrollDownButton] = useState(false);
|
|
@@ -272,7 +296,14 @@ export function ChatList({
|
|
|
272
296
|
});
|
|
273
297
|
}
|
|
274
298
|
}
|
|
275
|
-
|
|
299
|
+
reportSupportError(error, {
|
|
300
|
+
section: 'send',
|
|
301
|
+
recoverable: true,
|
|
302
|
+
extras: {
|
|
303
|
+
retry: true,
|
|
304
|
+
contentLength: selectedMessage.length
|
|
305
|
+
}
|
|
306
|
+
});
|
|
276
307
|
setSelectedMessage('');
|
|
277
308
|
});
|
|
278
309
|
}
|
|
@@ -290,7 +321,7 @@ export function ChatList({
|
|
|
290
321
|
getCustomerConversation(customer.external_id, firstMessage?.created_at, newPage, {
|
|
291
322
|
fake: useAppStore.getState().fake,
|
|
292
323
|
per_page: MESSAGES_PER_PAGE
|
|
293
|
-
}).then(newData => {
|
|
324
|
+
}, lifecycleAbortRef.current?.signal).then(newData => {
|
|
294
325
|
listChangedRef.current = true;
|
|
295
326
|
setData(prevData => {
|
|
296
327
|
const newMessages = newData?.page?.data ?? [];
|
|
@@ -317,9 +348,17 @@ export function ChatList({
|
|
|
317
348
|
return prevData || []; // Return existing data or empty array
|
|
318
349
|
}
|
|
319
350
|
});
|
|
320
|
-
}).catch(
|
|
351
|
+
}).catch(err => {
|
|
321
352
|
nextPageStatus.current = 'fail';
|
|
322
353
|
setNexPageFailed(true);
|
|
354
|
+
reportSupportError(err, {
|
|
355
|
+
section: 'pagination',
|
|
356
|
+
recoverable: true,
|
|
357
|
+
extras: {
|
|
358
|
+
page,
|
|
359
|
+
perPage: MESSAGES_PER_PAGE
|
|
360
|
+
}
|
|
361
|
+
});
|
|
323
362
|
}).finally(() => {
|
|
324
363
|
setLoading(false);
|
|
325
364
|
});
|
|
@@ -328,14 +367,23 @@ export function ChatList({
|
|
|
328
367
|
const renderItem = useCallback(({
|
|
329
368
|
item
|
|
330
369
|
}) => {
|
|
331
|
-
|
|
370
|
+
const defaultNode = /*#__PURE__*/_jsx(MessageItem, {
|
|
332
371
|
item: item,
|
|
333
372
|
onShowPopup: () => {
|
|
334
373
|
setSelectedMessage(item.content);
|
|
335
374
|
setPopupVisible(true);
|
|
336
375
|
}
|
|
337
376
|
});
|
|
338
|
-
|
|
377
|
+
if (renderMessageOverride) {
|
|
378
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
379
|
+
children: renderMessageOverride({
|
|
380
|
+
message: item,
|
|
381
|
+
defaultNode
|
|
382
|
+
})
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
return defaultNode;
|
|
386
|
+
}, [renderMessageOverride]);
|
|
339
387
|
const renderSectionFooter = useCallback(({
|
|
340
388
|
section
|
|
341
389
|
}) => {
|
|
@@ -375,7 +423,7 @@ export function ChatList({
|
|
|
375
423
|
getCustomerConversation(customer?.external_id, new Date(), 1, {
|
|
376
424
|
fake: useAppStore.getState().fake,
|
|
377
425
|
per_page: MESSAGES_PER_PAGE
|
|
378
|
-
}).then(newData => {
|
|
426
|
+
}, lifecycleAbortRef.current?.signal).then(newData => {
|
|
379
427
|
setData(prevData => {
|
|
380
428
|
const newMessages = newData?.page?.data ?? [];
|
|
381
429
|
// Only proceed with filtering if we have previous data
|
|
@@ -404,7 +452,13 @@ export function ChatList({
|
|
|
404
452
|
});
|
|
405
453
|
}).catch(e => {
|
|
406
454
|
setInitFailed(true);
|
|
407
|
-
|
|
455
|
+
reportSupportError(e, {
|
|
456
|
+
section: 'init',
|
|
457
|
+
recoverable: true,
|
|
458
|
+
extras: {
|
|
459
|
+
perPage: MESSAGES_PER_PAGE
|
|
460
|
+
}
|
|
461
|
+
});
|
|
408
462
|
}).finally(() => {
|
|
409
463
|
setLoading(false);
|
|
410
464
|
});
|
|
@@ -427,37 +481,32 @@ export function ChatList({
|
|
|
427
481
|
};
|
|
428
482
|
}, []);
|
|
429
483
|
if (nexPageFailed) {
|
|
430
|
-
return /*#__PURE__*/_jsx(
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
onPress: () => {
|
|
439
|
-
setNexPageFailed(false);
|
|
440
|
-
nextPageStatus.current = undefined;
|
|
441
|
-
nextPage();
|
|
442
|
-
},
|
|
443
|
-
activeOpacity: activeOpacity,
|
|
444
|
-
children: /*#__PURE__*/_jsx(AppText, {
|
|
445
|
-
localization: "chat.load.error",
|
|
446
|
-
style: [styles.retryText, {
|
|
447
|
-
color: themeColors.background
|
|
448
|
-
}]
|
|
449
|
-
})
|
|
450
|
-
})
|
|
484
|
+
return /*#__PURE__*/_jsx(InitFailed, {
|
|
485
|
+
localization: "chat.load.error",
|
|
486
|
+
onBack: onBack,
|
|
487
|
+
onRetry: () => {
|
|
488
|
+
setNexPageFailed(false);
|
|
489
|
+
nextPageStatus.current = undefined;
|
|
490
|
+
nextPage();
|
|
491
|
+
}
|
|
451
492
|
});
|
|
452
493
|
}
|
|
453
494
|
if (initFailed) {
|
|
495
|
+
if (renderErrorStateOverride) {
|
|
496
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
497
|
+
children: renderErrorStateOverride({
|
|
498
|
+
retry: () => setInitFailed(false)
|
|
499
|
+
})
|
|
500
|
+
});
|
|
501
|
+
}
|
|
454
502
|
return /*#__PURE__*/_jsx(InitFailed, {
|
|
455
|
-
|
|
503
|
+
onRetry: () => setInitFailed(false),
|
|
504
|
+
onBack: onBack
|
|
456
505
|
});
|
|
457
506
|
}
|
|
458
507
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
459
508
|
children: [/*#__PURE__*/_jsx(StatusBar, {
|
|
460
|
-
barStyle: 'dark-content',
|
|
509
|
+
barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
|
|
461
510
|
backgroundColor: themeColors.background,
|
|
462
511
|
animated: false,
|
|
463
512
|
translucent: true
|
|
@@ -471,47 +520,55 @@ export function ChatList({
|
|
|
471
520
|
backgroundColor: themeColors.background,
|
|
472
521
|
paddingTop: insets.top || 40
|
|
473
522
|
}],
|
|
474
|
-
children: [/*#__PURE__*/_jsx(
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}],
|
|
478
|
-
onPress: onBack,
|
|
479
|
-
activeOpacity: activeOpacity,
|
|
480
|
-
children: /*#__PURE__*/_jsx(Image, {
|
|
481
|
-
source: closeIcon,
|
|
482
|
-
style: [styles.closeIcon, {
|
|
483
|
-
tintColor: themeColors.text
|
|
484
|
-
}]
|
|
523
|
+
children: [renderHeaderOverride ? /*#__PURE__*/_jsx(_Fragment, {
|
|
524
|
+
children: renderHeaderOverride({
|
|
525
|
+
onBack
|
|
485
526
|
})
|
|
486
|
-
})
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}],
|
|
491
|
-
children: [/*#__PURE__*/_jsx(AppText, {
|
|
492
|
-
localization: "chat.support-team",
|
|
493
|
-
weight: '600',
|
|
494
|
-
style: [styles.header, {
|
|
495
|
-
color: themeColors.text
|
|
496
|
-
}]
|
|
497
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
498
|
-
style: [styles.headerText, {
|
|
499
|
-
backgroundColor: themeColors.background
|
|
527
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
528
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
529
|
+
style: [styles.iconContainer, {
|
|
530
|
+
top: insets.top || 40
|
|
500
531
|
}],
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
532
|
+
onPress: onBack,
|
|
533
|
+
activeOpacity: activeOpacity,
|
|
534
|
+
accessibilityRole: "button",
|
|
535
|
+
accessibilityLabel: "Close support",
|
|
536
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
537
|
+
source: closeIcon,
|
|
538
|
+
style: [styles.closeIcon, {
|
|
504
539
|
tintColor: themeColors.text
|
|
505
540
|
}]
|
|
506
|
-
})
|
|
507
|
-
|
|
508
|
-
|
|
541
|
+
})
|
|
542
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
543
|
+
style: [styles.headerContainer, {
|
|
544
|
+
backgroundColor: themeColors.background,
|
|
545
|
+
borderBottomColor: themeColors.lavender
|
|
546
|
+
}],
|
|
547
|
+
children: [/*#__PURE__*/_jsx(AppText, {
|
|
548
|
+
localization: "chat.support-team",
|
|
549
|
+
weight: '600',
|
|
550
|
+
style: [styles.header, {
|
|
509
551
|
color: themeColors.text
|
|
510
552
|
}]
|
|
511
|
-
}), /*#__PURE__*/
|
|
512
|
-
style: [styles.
|
|
513
|
-
backgroundColor: themeColors.
|
|
514
|
-
}]
|
|
553
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
554
|
+
style: [styles.headerText, {
|
|
555
|
+
backgroundColor: themeColors.background
|
|
556
|
+
}],
|
|
557
|
+
children: [/*#__PURE__*/_jsx(Image, {
|
|
558
|
+
source: headphonesIcon,
|
|
559
|
+
style: [styles.headphonesIcon, {
|
|
560
|
+
tintColor: themeColors.text
|
|
561
|
+
}]
|
|
562
|
+
}), /*#__PURE__*/_jsx(AppText, {
|
|
563
|
+
localization: "chat.live",
|
|
564
|
+
style: [styles.liveChat, {
|
|
565
|
+
color: themeColors.text
|
|
566
|
+
}]
|
|
567
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
568
|
+
style: [styles.dot, {
|
|
569
|
+
backgroundColor: themeColors.green
|
|
570
|
+
}]
|
|
571
|
+
})]
|
|
515
572
|
})]
|
|
516
573
|
})]
|
|
517
574
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -526,7 +583,9 @@ export function ChatList({
|
|
|
526
583
|
backgroundColor: themeColors.background
|
|
527
584
|
}],
|
|
528
585
|
style: styles.list,
|
|
529
|
-
ListEmptyComponent: !loading && (!sections || sections.length === 0) ? /*#__PURE__*/_jsx(
|
|
586
|
+
ListEmptyComponent: !loading && (!sections || sections.length === 0) ? renderEmptyStateOverride ? /*#__PURE__*/_jsx(_Fragment, {
|
|
587
|
+
children: renderEmptyStateOverride()
|
|
588
|
+
}) : /*#__PURE__*/_jsx(EmptyList, {}) : null,
|
|
530
589
|
ListFooterComponent: loading ? /*#__PURE__*/_jsx(LoadingItem, {}) : null,
|
|
531
590
|
keyExtractor: (item, index) => item.id?.toString() ?? item.local_id ?? `fake-${index}`,
|
|
532
591
|
removeClippedSubviews: false,
|
|
@@ -549,6 +608,8 @@ export function ChatList({
|
|
|
549
608
|
backgroundColor: themeColors.ghost
|
|
550
609
|
}, isKeyboardVisible && styles.scrollDownButtonWithKeyboard],
|
|
551
610
|
onPress: () => scrollToBottom(true),
|
|
611
|
+
accessibilityRole: "button",
|
|
612
|
+
accessibilityLabel: "Scroll to latest message",
|
|
552
613
|
children: /*#__PURE__*/_jsx(Image, {
|
|
553
614
|
source: require('../assets/down.png'),
|
|
554
615
|
style: [styles.scrollUpIcon, {
|
|
@@ -620,23 +681,6 @@ const styles = ScaledSheet.create({
|
|
|
620
681
|
width: '18@vs',
|
|
621
682
|
height: '18@vs'
|
|
622
683
|
},
|
|
623
|
-
retryContainer: {
|
|
624
|
-
flex: 1,
|
|
625
|
-
alignItems: 'center',
|
|
626
|
-
justifyContent: 'center',
|
|
627
|
-
paddingHorizontal: '20@s',
|
|
628
|
-
paddingVertical: '20@vs'
|
|
629
|
-
},
|
|
630
|
-
retryButton: {
|
|
631
|
-
padding: 15,
|
|
632
|
-
borderRadius: '8@s',
|
|
633
|
-
alignItems: 'center',
|
|
634
|
-
justifyContent: 'center'
|
|
635
|
-
},
|
|
636
|
-
retryText: {
|
|
637
|
-
fontSize: '16@vs',
|
|
638
|
-
fontWeight: '500'
|
|
639
|
-
},
|
|
640
684
|
headphonesIcon: {
|
|
641
685
|
width: '24@vs',
|
|
642
686
|
height: '24@vs'
|
|
@@ -702,7 +746,6 @@ const styles = ScaledSheet.create({
|
|
|
702
746
|
zIndex: 9999
|
|
703
747
|
},
|
|
704
748
|
toastContent: {
|
|
705
|
-
backgroundColor: '#333333',
|
|
706
749
|
borderRadius: '8@s',
|
|
707
750
|
paddingHorizontal: '16@s',
|
|
708
751
|
paddingVertical: '12@vs',
|
|
@@ -717,7 +760,6 @@ const styles = ScaledSheet.create({
|
|
|
717
760
|
maxWidth: '90%'
|
|
718
761
|
},
|
|
719
762
|
toastText: {
|
|
720
|
-
color: '#FFFFFF',
|
|
721
763
|
fontSize: '14@vs',
|
|
722
764
|
fontWeight: '400',
|
|
723
765
|
textAlign: 'center'
|