@developer_tribe/react-native-comnyx 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +105 -19
- 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.m +6 -0
- package/ios/ComnyxMediaPicker.swift +106 -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 +46 -6
- 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/assets/gallery.png +0 -0
- package/lib/commonjs/assets/video-play.png +0 -0
- package/lib/commonjs/components/ChatList.js +93 -45
- 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 +2 -2
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/MediaMessageItem.js +4 -3
- package/lib/commonjs/components/MediaMessageItem.js.map +1 -1
- package/lib/commonjs/components/MediaPickerButton.js +211 -14
- package/lib/commonjs/components/MediaPickerButton.js.map +1 -1
- package/lib/commonjs/components/MediaViewerModal.js +7 -0
- package/lib/commonjs/components/MediaViewerModal.js.map +1 -1
- package/lib/commonjs/components/MessageInput.js +63 -13
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +1 -2
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/constants/translations.js +87 -116
- package/lib/commonjs/constants/translations.js.map +1 -1
- package/lib/commonjs/hooks/usePolling.js +25 -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.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/store/store.js +6 -0
- package/lib/commonjs/store/store.js.map +1 -1
- package/lib/commonjs/support/ComnyxSupport.js +60 -15
- package/lib/commonjs/support/ComnyxSupport.js.map +1 -1
- package/lib/commonjs/support/SupportConfigContext.js +24 -0
- package/lib/commonjs/support/SupportConfigContext.js.map +1 -0
- 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 +43 -6
- 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/assets/gallery.png +0 -0
- package/lib/module/assets/video-play.png +0 -0
- package/lib/module/components/ChatList.js +94 -46
- 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 +2 -2
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/MediaMessageItem.js +4 -3
- package/lib/module/components/MediaMessageItem.js.map +1 -1
- package/lib/module/components/MediaPickerButton.js +215 -18
- package/lib/module/components/MediaPickerButton.js.map +1 -1
- package/lib/module/components/MediaViewerModal.js +8 -1
- package/lib/module/components/MediaViewerModal.js.map +1 -1
- package/lib/module/components/MessageInput.js +64 -14
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/components/MessageItem.js +1 -2
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/constants/translations.js +87 -116
- package/lib/module/constants/translations.js.map +1 -1
- package/lib/module/hooks/usePolling.js +25 -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 +0 -1
- 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/store/store.js +6 -0
- package/lib/module/store/store.js.map +1 -1
- package/lib/module/support/ComnyxSupport.js +61 -16
- package/lib/module/support/ComnyxSupport.js.map +1 -1
- package/lib/module/support/SupportConfigContext.js +19 -0
- package/lib/module/support/SupportConfigContext.js.map +1 -0
- 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 +11 -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/MediaMessageItem.d.ts.map +1 -1
- package/lib/typescript/src/components/MediaPickerButton.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/constants/translations.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 +2 -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/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 +56 -2
- package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -1
- package/lib/typescript/src/support/SupportConfigContext.d.ts +58 -0
- package/lib/typescript/src/support/SupportConfigContext.d.ts.map +1 -0
- package/lib/typescript/src/support/index.d.ts +1 -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/LocalizationKeys.d.ts +0 -1
- package/lib/typescript/src/types/LocalizationKeys.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 +12 -25
- package/src/NativeComnyxMediaPicker.ts +46 -7
- 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/assets/gallery.png +0 -0
- package/src/assets/video-play.png +0 -0
- package/src/components/ChatList.tsx +115 -55
- package/src/components/ComnyxErrorBoundary.tsx +91 -0
- package/src/components/CustomerForm.tsx +2 -2
- package/src/components/MediaMessageItem.tsx +10 -3
- package/src/components/MediaPickerButton.tsx +238 -17
- package/src/components/MediaViewerModal.tsx +8 -1
- package/src/components/MessageInput.tsx +89 -16
- package/src/components/MessageItem.tsx +12 -14
- package/src/constants/translations.ts +87 -116
- package/src/hooks/usePolling.ts +21 -11
- package/src/hooks/useThemeColors.ts +11 -2
- package/src/index.ts +12 -0
- package/src/notifications/initializeNotifications.ts +22 -20
- package/src/register/Accumulator.ts +26 -9
- package/src/register/collectData.ts +10 -2
- package/src/store/store.ts +11 -3
- package/src/support/ComnyxSupport.tsx +128 -22
- package/src/support/SupportConfigContext.tsx +79 -0
- package/src/support/index.ts +7 -0
- package/src/types/Conversation.ts +2 -2
- package/src/types/Customer.ts +1 -2
- package/src/types/LocalizationKeys.ts +0 -1
- package/src/types/MessageResponse.ts +4 -4
- package/src/types/Theme.ts +38 -0
- package/src/version.ts +1 -1
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View, TouchableOpacity, Image } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
5
|
import { ChatList } from "../components/ChatList.js";
|
|
5
6
|
import { CustomerForm } from "../components/CustomerForm.js";
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
7
8
|
import { AppText } from "../components/AppText.js";
|
|
8
9
|
import { useThemeColors } from "../hooks/useThemeColors.js";
|
|
9
10
|
import { usePolling } from "../hooks/usePolling.js";
|
|
10
11
|
import { useAppStore } from "../store/store.js";
|
|
11
12
|
import { ScaledSheet } from "../components/ScaledSheet.js";
|
|
12
13
|
import { accumulator } from "../register/Accumulator.js";
|
|
14
|
+
import { SupportConfigProvider } from "./SupportConfigContext.js";
|
|
15
|
+
import { ComnyxErrorBoundary } from "../components/ComnyxErrorBoundary.js";
|
|
13
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
17
|
const closeIcon = require('../assets/x-close.png');
|
|
15
|
-
|
|
18
|
+
function ComnyxSupportInner({
|
|
16
19
|
language = 'en',
|
|
17
20
|
theme = 'dark',
|
|
18
21
|
fake = false,
|
|
19
22
|
onBack,
|
|
20
23
|
themes,
|
|
21
|
-
|
|
24
|
+
themeOverride,
|
|
25
|
+
containerStyle,
|
|
26
|
+
renderHeader,
|
|
27
|
+
renderEmptyState,
|
|
28
|
+
renderErrorState,
|
|
29
|
+
renderMessage,
|
|
30
|
+
onBeforeSend
|
|
22
31
|
}) {
|
|
23
32
|
const {
|
|
24
33
|
customer,
|
|
@@ -29,13 +38,24 @@ export function ComnyxSupport({
|
|
|
29
38
|
}));
|
|
30
39
|
const [initLoading, setInitLoading] = useState(true);
|
|
31
40
|
const themeColors = useThemeColors();
|
|
41
|
+
const insets = useSafeAreaInsets();
|
|
32
42
|
usePolling();
|
|
43
|
+
const supportConfig = useMemo(() => ({
|
|
44
|
+
renderHeader,
|
|
45
|
+
renderEmptyState,
|
|
46
|
+
renderErrorState,
|
|
47
|
+
renderMessage,
|
|
48
|
+
onBeforeSend
|
|
49
|
+
}), [renderHeader, renderEmptyState, renderErrorState, renderMessage, onBeforeSend]);
|
|
33
50
|
useEffect(() => {
|
|
34
51
|
if (!accumulator.isListenerCalledOnce()) {
|
|
35
52
|
accumulator.flush().then(() => {
|
|
36
53
|
setTimeout(() => {
|
|
37
54
|
setInitLoading(false);
|
|
38
55
|
}, 100);
|
|
56
|
+
}).catch(err => {
|
|
57
|
+
console.error('[Comnyx] accumulator.flush failed', err);
|
|
58
|
+
setInitLoading(false);
|
|
39
59
|
});
|
|
40
60
|
} else {
|
|
41
61
|
setInitLoading(false);
|
|
@@ -49,24 +69,37 @@ export function ComnyxSupport({
|
|
|
49
69
|
}
|
|
50
70
|
}, [customer, customer?.external_id]);
|
|
51
71
|
useEffect(() => {
|
|
52
|
-
//TOOD: getState().initApp({language,theme,fake,rtlFix,themes})
|
|
53
72
|
useAppStore.getState().setLanguage(language);
|
|
54
73
|
useAppStore.getState().setTheme(theme);
|
|
55
74
|
useAppStore.getState().setFake(fake);
|
|
56
75
|
if (themes) {
|
|
57
76
|
useAppStore.getState().setThemes(themes);
|
|
58
77
|
}
|
|
59
|
-
|
|
78
|
+
if (themeOverride) {
|
|
79
|
+
useAppStore.getState().setThemeOverride(themeOverride);
|
|
80
|
+
}
|
|
81
|
+
}, [language, theme, fake, themes, themeOverride]);
|
|
82
|
+
let body;
|
|
60
83
|
if (!customer) {
|
|
61
84
|
//NOTE: customer yoksa register hiç çalışmamış
|
|
62
|
-
|
|
85
|
+
body = /*#__PURE__*/_jsxs(View, {
|
|
63
86
|
style: [styles.container, {
|
|
64
87
|
backgroundColor: themeColors.background
|
|
65
88
|
}],
|
|
66
89
|
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
67
90
|
activeOpacity: 1,
|
|
68
|
-
style: [styles.iconContainer
|
|
91
|
+
style: [styles.iconContainer, {
|
|
92
|
+
top: Math.max(insets.top, 16) + 16
|
|
93
|
+
}],
|
|
69
94
|
onPress: onBack,
|
|
95
|
+
accessibilityRole: "button",
|
|
96
|
+
accessibilityLabel: "Close support",
|
|
97
|
+
hitSlop: {
|
|
98
|
+
top: 12,
|
|
99
|
+
bottom: 12,
|
|
100
|
+
left: 12,
|
|
101
|
+
right: 12
|
|
102
|
+
},
|
|
70
103
|
children: /*#__PURE__*/_jsx(Image, {
|
|
71
104
|
source: closeIcon,
|
|
72
105
|
style: [styles.closeIcon, {
|
|
@@ -82,19 +115,32 @@ export function ComnyxSupport({
|
|
|
82
115
|
});
|
|
83
116
|
} else if (!formSubmitted) {
|
|
84
117
|
//NOTE: customer var ama forSubmitted false (name===null)
|
|
85
|
-
|
|
118
|
+
body = /*#__PURE__*/_jsx(CustomerForm, {
|
|
86
119
|
loading: initLoading,
|
|
87
120
|
onBack: onBack,
|
|
88
121
|
containerStyle: containerStyle
|
|
89
122
|
});
|
|
123
|
+
} else {
|
|
124
|
+
body = /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: [styles.container, {
|
|
126
|
+
backgroundColor: themeColors.background
|
|
127
|
+
}, containerStyle],
|
|
128
|
+
children: /*#__PURE__*/_jsx(ChatList, {
|
|
129
|
+
initLoading: initLoading,
|
|
130
|
+
onBack: onBack
|
|
131
|
+
})
|
|
132
|
+
});
|
|
90
133
|
}
|
|
91
|
-
return /*#__PURE__*/_jsx(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
134
|
+
return /*#__PURE__*/_jsx(SupportConfigProvider, {
|
|
135
|
+
value: supportConfig,
|
|
136
|
+
children: body
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
export function ComnyxSupport(props) {
|
|
140
|
+
return /*#__PURE__*/_jsx(ComnyxErrorBoundary, {
|
|
141
|
+
onBack: props.onBack,
|
|
142
|
+
children: /*#__PURE__*/_jsx(ComnyxSupportInner, {
|
|
143
|
+
...props
|
|
98
144
|
})
|
|
99
145
|
});
|
|
100
146
|
}
|
|
@@ -105,7 +151,6 @@ const styles = ScaledSheet.create({
|
|
|
105
151
|
},
|
|
106
152
|
iconContainer: {
|
|
107
153
|
position: 'absolute',
|
|
108
|
-
top: '60@vs',
|
|
109
154
|
left: '24@s'
|
|
110
155
|
},
|
|
111
156
|
closeIcon: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","TouchableOpacity","Image","ChatList","CustomerForm","useEffect","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","jsx","_jsx","jsxs","_jsxs","closeIcon","require","
|
|
1
|
+
{"version":3,"names":["View","TouchableOpacity","Image","useSafeAreaInsets","ChatList","CustomerForm","useEffect","useMemo","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","SupportConfigProvider","ComnyxErrorBoundary","jsx","_jsx","jsxs","_jsxs","closeIcon","require","ComnyxSupportInner","language","theme","fake","onBack","themes","themeOverride","containerStyle","renderHeader","renderEmptyState","renderErrorState","renderMessage","onBeforeSend","customer","formSubmitted","s","initLoading","setInitLoading","themeColors","insets","supportConfig","isListenerCalledOnce","flush","then","setTimeout","catch","err","console","error","external_id","setState","data","getState","setLanguage","setTheme","setFake","setThemes","setThemeOverride","body","style","styles","container","backgroundColor","background","children","activeOpacity","iconContainer","top","Math","max","onPress","accessibilityRole","accessibilityLabel","hitSlop","bottom","left","right","source","tintColor","text","textAlign","localization","loading","value","ComnyxSupport","props","create","flex","justifyContent","position","width","height"],"sourceRoot":"../../../src","sources":["support/ComnyxSupport.tsx"],"mappings":";;AAAA,SACEA,IAAI,EACJC,gBAAgB,EAChBC,KAAK,QAGA,cAAc;AACrB,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,2BAAwB;AACjD,SAASC,YAAY,QAAQ,+BAA4B;AAIzD,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAA2B,OAAO;AACvE,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,UAAU,QAAQ,wBAAqB;AAChD,SAASC,WAAW,QAAQ,mBAAgB;AAC5C,SAASC,WAAW,QAAQ,8BAA2B;AACvD,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SACEC,qBAAqB,QAEhB,2BAAwB;AAC/B,SAASC,mBAAmB,QAAQ,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACxE,MAAMC,SAAS,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AAEA,OAAO,SAAS0B,aAAaA,CAACC,KAAyB,EAAE;EACvD,oBACEtE,IAAA,CAACF,mBAAmB;IAACW,MAAM,EAAE6D,KAAK,CAAC7D,MAAO;IAAAwC,QAAA,eACxCjD,IAAA,CAACK,kBAAkB;MAAA,GAAKiE;IAAK,CAAG;EAAC,CACd,CAAC;AAE1B;AAEA,MAAMzB,MAAM,GAAGlD,WAAW,CAAC4E,MAAM,CAAC;EAChCzB,SAAS,EAAE;IACT0B,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDtB,aAAa,EAAE;IACbuB,QAAQ,EAAE,UAAU;IACpBd,IAAI,EAAE;EACR,CAAC;EACDzD,SAAS,EAAE;IACTwE,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const EMPTY_CONFIG = {};
|
|
6
|
+
const SupportConfigContext = /*#__PURE__*/createContext(EMPTY_CONFIG);
|
|
7
|
+
export function SupportConfigProvider({
|
|
8
|
+
value,
|
|
9
|
+
children
|
|
10
|
+
}) {
|
|
11
|
+
return /*#__PURE__*/_jsx(SupportConfigContext.Provider, {
|
|
12
|
+
value: value,
|
|
13
|
+
children: children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function useSupportConfig() {
|
|
17
|
+
return useContext(SupportConfigContext);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=SupportConfigContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","jsx","_jsx","EMPTY_CONFIG","SupportConfigContext","SupportConfigProvider","value","children","Provider","useSupportConfig"],"sourceRoot":"../../../src","sources":["support/SupportConfigContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA0DlE,MAAMC,YAA2B,GAAG,CAAC,CAAC;AAEtC,MAAMC,oBAAoB,gBAAGL,aAAa,CAAgBI,YAAY,CAAC;AAEvE,OAAO,SAASE,qBAAqBA,CAAC;EACpCC,KAAK;EACLC;AAIF,CAAC,EAAE;EACD,oBACEL,IAAA,CAACE,oBAAoB,CAACI,QAAQ;IAACF,KAAK,EAAEA,KAAM;IAAAC,QAAA,EACzCA;EAAQ,CACoB,CAAC;AAEpC;AAEA,OAAO,SAASE,gBAAgBA,CAAA,EAAkB;EAChD,OAAOT,UAAU,CAACI,oBAAoB,CAAC;AACzC","ignoreList":[]}
|
|
@@ -19,7 +19,12 @@ export const lightTheme = {
|
|
|
19
19
|
ghost: '#EFEFEF',
|
|
20
20
|
navy: '#191A21',
|
|
21
21
|
lavender: '#E0E0E0',
|
|
22
|
-
silver: '#C7C7C7'
|
|
22
|
+
silver: '#C7C7C7',
|
|
23
|
+
link: '#0066CC',
|
|
24
|
+
toastBackground: '#333333',
|
|
25
|
+
toastText: '#FFFFFF',
|
|
26
|
+
playIcon: '#FFFFFF',
|
|
27
|
+
videoPlaceholder: '#1A1A2E'
|
|
23
28
|
};
|
|
24
29
|
export const darkTheme = {
|
|
25
30
|
primary: '#4361EE',
|
|
@@ -40,6 +45,29 @@ export const darkTheme = {
|
|
|
40
45
|
ghost: '#202129',
|
|
41
46
|
navy: '#F5F5F5',
|
|
42
47
|
lavender: '#262730',
|
|
43
|
-
silver: '#44454D'
|
|
48
|
+
silver: '#44454D',
|
|
49
|
+
link: '#4D9FFF',
|
|
50
|
+
toastBackground: '#2A2A2A',
|
|
51
|
+
toastText: '#FFFFFF',
|
|
52
|
+
playIcon: '#FFFFFF',
|
|
53
|
+
videoPlaceholder: '#1A1A2E'
|
|
44
54
|
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Partial override for a single theme mode. Consumers can change one or more
|
|
58
|
+
* tokens without redeclaring the whole palette.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Full override map accepted by `ComnyxSupport.themeOverride`. Any token not
|
|
63
|
+
* provided falls back to the built-in light/dark palette.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* <ComnyxSupport
|
|
67
|
+
* themeOverride={{
|
|
68
|
+
* light: { primary: '#FF6B6B', link: '#FF9999' },
|
|
69
|
+
* dark: { primary: '#FF9999' },
|
|
70
|
+
* }}
|
|
71
|
+
* />
|
|
72
|
+
*/
|
|
45
73
|
//# sourceMappingURL=Theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","link","toastBackground","toastText","playIcon","videoPlaceholder","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;AA2BA,OAAO,MAAMA,UAAuB,GAAG;EACrCC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE,SAAS;EACnBC,gBAAgB,EAAE;AACpB,CAAC;AAED,OAAO,MAAMC,SAAsB,GAAG;EACpCxB,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE,SAAS;EACnBC,gBAAgB,EAAE;AACpB,CAAC;;AAOD;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type { MediaAsset } from './types/MediaTypes';
|
|
2
2
|
export declare function pickMedia(): Promise<MediaAsset[]>;
|
|
3
|
+
export declare function pickImage(): Promise<MediaAsset[]>;
|
|
4
|
+
export declare function pickVideo(): Promise<MediaAsset[]>;
|
|
3
5
|
export declare function openVideo(uri: string): Promise<void>;
|
|
4
6
|
export declare function generateThumbnail(videoUrl: string): Promise<string | null>;
|
|
5
7
|
export declare function deleteTempFile(uri: string): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Android only. Converts a local file URI returned by the picker into a
|
|
10
|
+
* `content://` URI served by the Comnyx FileProvider, suitable for crossing
|
|
11
|
+
* process boundaries (e.g. sharing to another app, system ACTION_VIEW).
|
|
12
|
+
*
|
|
13
|
+
* On iOS, returns the input URI unchanged since iOS does not have the
|
|
14
|
+
* FileUriExposedException problem.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getShareableUri(fileUri: string): Promise<string>;
|
|
6
17
|
export declare function cleanupTempFiles(): Promise<void>;
|
|
7
18
|
//# sourceMappingURL=NativeComnyxMediaPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQtE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtD"}
|
|
@@ -2,6 +2,6 @@ import type { ConversationResponse } from '../types/Conversation';
|
|
|
2
2
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
3
3
|
export declare function getCustomerConversation(externalId: string, created_at: Date | undefined, page: number, options: ApiOptions & {
|
|
4
4
|
per_page?: number;
|
|
5
|
-
}): Promise<ConversationResponse>;
|
|
6
|
-
export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions): Promise<ConversationResponse>;
|
|
5
|
+
}, signal?: AbortSignal): Promise<ConversationResponse>;
|
|
6
|
+
export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions, signal?: AbortSignal): Promise<ConversationResponse>;
|
|
7
7
|
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAa/B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateCustomerRequest, Customer } from '../types/Customer';
|
|
2
|
-
export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string): Promise<{
|
|
2
|
+
export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string, signal?: AbortSignal): Promise<{
|
|
3
3
|
customer: Customer;
|
|
4
4
|
}>;
|
|
5
5
|
//# sourceMappingURL=customers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC,CAUjC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UploadUrlResponse } from '../types/MediaTypes';
|
|
2
2
|
import type { MessageResponse } from '../types/MessageResponse';
|
|
3
3
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
4
|
-
export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions): Promise<UploadUrlResponse>;
|
|
5
|
-
export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions): Promise<void>;
|
|
6
|
-
export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions): Promise<MessageResponse>;
|
|
4
|
+
export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions, signal?: AbortSignal): Promise<UploadUrlResponse>;
|
|
5
|
+
export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions, signal?: AbortSignal): Promise<void>;
|
|
6
|
+
export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
|
|
7
7
|
//# sourceMappingURL=media.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAYtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAc5B;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,CAAC,EAAE,UAAU,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CA+Df;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,EAAE,OAAO,GAAG,OAAO,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MessageResponse } from '../types/MessageResponse';
|
|
2
2
|
import type { ApiOptions } from '../types/ApiOptions';
|
|
3
|
-
export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions): Promise<MessageResponse>;
|
|
3
|
+
export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
|
|
4
4
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAwB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAgLA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CA0nBA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, type ReactNode, type ErrorInfo } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
onBack?: () => void;
|
|
5
|
+
fallback?: (reset: () => void) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface State {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class ComnyxErrorBoundary extends Component<Props, State> {
|
|
11
|
+
state: State;
|
|
12
|
+
static getDerivedStateFromError(): State;
|
|
13
|
+
componentDidCatch(error: Error, info: ErrorInfo): void;
|
|
14
|
+
reset: () => void;
|
|
15
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ComnyxErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComnyxErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/ComnyxErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlE,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CAC7C;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAuB;IAEnC,MAAM,CAAC,wBAAwB,IAAI,KAAK;IAIxC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;IAI/C,KAAK,aAEH;IAEF,MAAM;CA2BP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AA6FpE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CA2KA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaPickerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaPickerButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MediaPickerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaPickerButton.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,iBAAiB,CAAC,EAChC,eAAe,GAChB,EAAE;IACD,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CACjD,2CAmKA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaViewerModal.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaViewerModal.tsx"],"names":[],"mappings":"AAcA,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,
|
|
1
|
+
{"version":3,"file":"MediaViewerModal.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaViewerModal.tsx"],"names":[],"mappings":"AAcA,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,2CA0EA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,2CAmbA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAiBpE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CASA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,CA4sD1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,SAiDzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,wBAAgB,cAAc,IAAI,WAAW,CAS5C"}
|
|
@@ -4,6 +4,8 @@ export { Comnyx } from './register';
|
|
|
4
4
|
export { ComnyxSupport } from './support';
|
|
5
5
|
export { ComnyxNotifications } from './notifications';
|
|
6
6
|
export { NotificationPermissionStatus } from './NativeComnyx';
|
|
7
|
+
export type { ThemeColors, ThemeColorsOverride, ThemeOverrideConfig, } from './types/Theme';
|
|
8
|
+
export type { SupportConfig, SupportHeaderRenderProps, SupportErrorRenderProps, SupportMessageRenderProps, SupportSendPayload, } from './support';
|
|
7
9
|
export { registerOneSignalForComnyx } from './register/collectData';
|
|
8
10
|
export { useIsComnyxRegistered } from './hooks/useIsComnyxRegistered';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;
|
|
1
|
+
{"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;AAyFD,wBAAsB,uBAAuB,CAC3C,MAAM,GAAE,6BAAkC,oBAsF3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,mBAAmB,CAAC;AAIhF,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAwD;IAC7E,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IA4CtD,KAAK;IAwBX,QAAQ;IAmBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { CustomParameter } from '../types/Customer';
|
|
2
|
+
import { accumulator } from './Accumulator';
|
|
3
|
+
export declare function collectData(key: string, value: CustomParameter['value']): void;
|
|
4
|
+
export declare function collectData(data: Partial<Parameters<typeof accumulator.add>[0]>): void;
|
|
2
5
|
export declare function registerOneSignalForComnyx(external_id: string): void;
|
|
3
6
|
//# sourceMappingURL=collectData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GACnD,IAAI,CAAC;AAoBR,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,QAQ7D"}
|
|
@@ -3,6 +3,8 @@ import type { AppConversationMessage } from '../types/Conversation';
|
|
|
3
3
|
import type { LanguageCode } from '../types/Language';
|
|
4
4
|
import type { Customer } from '../types/Customer';
|
|
5
5
|
import type { LocalizationKeys } from '../types/LocalizationKeys';
|
|
6
|
+
import type { GlobalTheme } from '../types/GlobalTheme';
|
|
7
|
+
import type { ThemeOverrideConfig } from '../types/Theme';
|
|
6
8
|
interface AppStoreState {
|
|
7
9
|
baseHeight: number;
|
|
8
10
|
baseWidth: number;
|
|
@@ -11,7 +13,8 @@ interface AppStoreState {
|
|
|
11
13
|
language: LanguageCode;
|
|
12
14
|
theme: 'light' | 'dark';
|
|
13
15
|
fake: boolean;
|
|
14
|
-
themes:
|
|
16
|
+
themes: GlobalTheme;
|
|
17
|
+
themeOverride: ThemeOverrideConfig;
|
|
15
18
|
firstMessage: AppConversationMessage | null;
|
|
16
19
|
setData: (cb: (prevData: AppConversationMessage[] | null) => AppConversationMessage[] | null) => void;
|
|
17
20
|
setFirstMessage: (message: AppConversationMessage | null) => void;
|
|
@@ -19,7 +22,8 @@ interface AppStoreState {
|
|
|
19
22
|
setLanguage: (language: LanguageCode) => void;
|
|
20
23
|
setTheme: (theme: 'light' | 'dark') => void;
|
|
21
24
|
setFake: (fake: boolean) => void;
|
|
22
|
-
setThemes: (themes:
|
|
25
|
+
setThemes: (themes: GlobalTheme) => void;
|
|
26
|
+
setThemeOverride: (themeOverride: ThemeOverrideConfig) => void;
|
|
23
27
|
updateBaseDimensions: (config: {
|
|
24
28
|
baseHeight: number;
|
|
25
29
|
baseWidth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store/store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store/store.ts"],"names":[],"mappings":"AAGA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EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,gBAAgB,EAAE,CAAC,aAAa,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/D,oBAAoB,EAAE,CAAC,MAAM,EAAE;QAC7B,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,KAAK,IAAI,CAAC;IACX,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,uBAAuB,EAAE,OAAO,CAAC;IACjC,0BAA0B,EAAE,CAAC,uBAAuB,EAAE,OAAO,KAAK,IAAI,CAAC;IACvE,YAAY,EAAE,MAAM,gBAAgB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IAClE,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,aAAa,CAmEnD,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;EAYvB,CAAC"}
|
|
@@ -1,14 +1,68 @@
|
|
|
1
1
|
import { type ViewStyle, type StyleProp } from 'react-native';
|
|
2
2
|
import type { LanguageCode } from '../types/Language';
|
|
3
|
+
import type { GlobalTheme } from '../types/GlobalTheme';
|
|
4
|
+
import type { ThemeOverrideConfig } from '../types/Theme';
|
|
5
|
+
import { type SupportConfig } from './SupportConfigContext';
|
|
3
6
|
interface SupportComnyxProps {
|
|
7
|
+
/** Language code used for localised UI strings. Defaults to `'en'`. */
|
|
4
8
|
language?: LanguageCode;
|
|
9
|
+
/** Colour palette mode. Defaults to `'dark'`. */
|
|
5
10
|
theme?: 'light' | 'dark';
|
|
11
|
+
/** Render the chat in fake/demo mode (no network). */
|
|
6
12
|
fake?: boolean;
|
|
13
|
+
/** Called when the user taps the close button. */
|
|
7
14
|
onBack: () => void;
|
|
8
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Font-family provider. Shape: `{ family: (languageCode) => FamilyWeight }`.
|
|
17
|
+
* Not related to colour theming — use `themeOverride` for colours.
|
|
18
|
+
*/
|
|
19
|
+
themes?: GlobalTheme;
|
|
20
|
+
/**
|
|
21
|
+
* Partial override for the built-in colour palette. Only the tokens you
|
|
22
|
+
* specify are replaced; the rest fall back to the default light/dark theme.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <ComnyxSupport
|
|
26
|
+
* themeOverride={{
|
|
27
|
+
* light: { primary: '#FF6B6B', link: '#FF9999' },
|
|
28
|
+
* dark: { primary: '#FF9999' },
|
|
29
|
+
* }}
|
|
30
|
+
* />
|
|
31
|
+
*/
|
|
32
|
+
themeOverride?: ThemeOverrideConfig;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated No longer consumed. Kept for backward compatibility and will
|
|
35
|
+
* be removed in a future major release.
|
|
36
|
+
*/
|
|
9
37
|
rtlFix?: boolean;
|
|
38
|
+
/** Additional style merged onto the root container. */
|
|
10
39
|
containerStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
/**
|
|
41
|
+
* Replace the built-in header. Receives `{ onBack }`. Return `null` to hide
|
|
42
|
+
* the header entirely.
|
|
43
|
+
*/
|
|
44
|
+
renderHeader?: SupportConfig['renderHeader'];
|
|
45
|
+
/** Replace the built-in empty-state card shown when there are no messages. */
|
|
46
|
+
renderEmptyState?: SupportConfig['renderEmptyState'];
|
|
47
|
+
/**
|
|
48
|
+
* Replace the built-in init-failed screen. Receives `{ retry }` to trigger a
|
|
49
|
+
* first-page refetch.
|
|
50
|
+
*/
|
|
51
|
+
renderErrorState?: SupportConfig['renderErrorState'];
|
|
52
|
+
/**
|
|
53
|
+
* Wrap or replace individual message bubbles. Receives
|
|
54
|
+
* `{ message, defaultNode }` — return `defaultNode` as-is for no change,
|
|
55
|
+
* wrap it for decorations (reactions, swipe actions), or render a fully
|
|
56
|
+
* custom bubble.
|
|
57
|
+
*/
|
|
58
|
+
renderMessage?: SupportConfig['renderMessage'];
|
|
59
|
+
/**
|
|
60
|
+
* Called immediately before a message is dispatched. Throw or reject to
|
|
61
|
+
* cancel the send — the user's input and any pending media are preserved.
|
|
62
|
+
* Use for analytics, rate limiting, moderation or injecting extra context.
|
|
63
|
+
*/
|
|
64
|
+
onBeforeSend?: SupportConfig['onBeforeSend'];
|
|
11
65
|
}
|
|
12
|
-
export declare function ComnyxSupport(
|
|
66
|
+
export declare function ComnyxSupport(props: SupportComnyxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
67
|
export {};
|
|
14
68
|
//# sourceMappingURL=ComnyxSupport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComnyxSupport.d.ts","sourceRoot":"","sources":["../../../../src/support/ComnyxSupport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ComnyxSupport.d.ts","sourceRoot":"","sources":["../../../../src/support/ComnyxSupport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;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