@robylon/react-native-sdk 2.0.21-staging.2 → 2.0.21
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/lib/commonjs/Chatbotsdk.js +3 -3
- package/lib/commonjs/Chatbotsdk.js.map +1 -1
- package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js +2 -0
- package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js.map +1 -0
- package/lib/commonjs/FloatingButton/launchers/TextLauncher.js +2 -0
- package/lib/commonjs/FloatingButton/launchers/TextLauncher.js.map +1 -0
- package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js +2 -0
- package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js.map +1 -0
- package/lib/commonjs/FloatingButton.js +1 -1
- package/lib/commonjs/FloatingButton.js.map +1 -1
- package/lib/commonjs/config.js +1 -1
- package/lib/commonjs/config.js.map +1 -1
- package/lib/commonjs/constants/fontStyles.js +2 -0
- package/lib/commonjs/constants/fontStyles.js.map +1 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/openChatbot.js +1 -2
- package/lib/commonjs/openChatbot.js.map +1 -1
- package/lib/commonjs/utils/animations.js +2 -0
- package/lib/commonjs/utils/animations.js.map +1 -0
- package/lib/commonjs/utils/colorUtils.js +2 -0
- package/lib/commonjs/utils/colorUtils.js.map +1 -0
- package/lib/commonjs/versions/version.staging.js +1 -1
- package/lib/module/Chatbotsdk.js +3 -3
- package/lib/module/Chatbotsdk.js.map +1 -1
- package/lib/module/FloatingButton/launchers/ImageLauncher.js +2 -0
- package/lib/module/FloatingButton/launchers/ImageLauncher.js.map +1 -0
- package/lib/module/FloatingButton/launchers/TextLauncher.js +2 -0
- package/lib/module/FloatingButton/launchers/TextLauncher.js.map +1 -0
- package/lib/module/FloatingButton/launchers/TextualImageLauncher.js +2 -0
- package/lib/module/FloatingButton/launchers/TextualImageLauncher.js.map +1 -0
- package/lib/module/FloatingButton.js +1 -1
- package/lib/module/FloatingButton.js.map +1 -1
- package/lib/module/config.js +1 -1
- package/lib/module/config.js.map +1 -1
- package/lib/module/constants/fontStyles.js +2 -0
- package/lib/module/constants/fontStyles.js.map +1 -0
- package/lib/module/constants.js +1 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/openChatbot.js.map +1 -1
- package/lib/module/utils/animations.js +2 -0
- package/lib/module/utils/animations.js.map +1 -0
- package/lib/module/utils/colorUtils.js +2 -0
- package/lib/module/utils/colorUtils.js.map +1 -0
- package/lib/module/versions/version.staging.js +1 -1
- package/lib/typescript/Chatbotsdk.d.ts.map +1 -1
- package/lib/typescript/FloatingButton/launchers/ImageLauncher.d.ts +10 -0
- package/lib/typescript/FloatingButton/launchers/ImageLauncher.d.ts.map +1 -0
- package/lib/typescript/FloatingButton/launchers/TextLauncher.d.ts +10 -0
- package/lib/typescript/FloatingButton/launchers/TextLauncher.d.ts.map +1 -0
- package/lib/typescript/FloatingButton/launchers/TextualImageLauncher.d.ts +10 -0
- package/lib/typescript/FloatingButton/launchers/TextualImageLauncher.d.ts.map +1 -0
- package/lib/typescript/FloatingButton.d.ts +2 -0
- package/lib/typescript/FloatingButton.d.ts.map +1 -1
- package/lib/typescript/constants/fontStyles.d.ts +3 -0
- package/lib/typescript/constants/fontStyles.d.ts.map +1 -0
- package/lib/typescript/utils/animations.d.ts +38 -0
- package/lib/typescript/utils/animations.d.ts.map +1 -0
- package/lib/typescript/utils/colorUtils.d.ts +2 -0
- package/lib/typescript/utils/colorUtils.d.ts.map +1 -0
- package/lib/typescript/versions/version.staging.d.ts +1 -1
- package/package.json +2 -2
- package/lib/commonjs/ChatbotWebview.js +0 -2
- package/lib/commonjs/ChatbotWebview.js.map +0 -1
- package/lib/module/ChatbotWebview.js +0 -2
- package/lib/module/ChatbotWebview.js.map +0 -1
- package/lib/typescript/ChatbotWebview.d.ts +0 -8
- package/lib/typescript/ChatbotWebview.d.ts.map +0 -1
- package/src/ChatbotWebview.tsx +0 -44
- package/src/Chatbotsdk.tsx +0 -778
- package/src/FloatingButton.tsx +0 -88
- package/src/LoadingIndicator.tsx +0 -11
- package/src/Toast.tsx +0 -65
- package/src/components/DebugButton.tsx +0 -46
- package/src/components/ErrorBoundary.tsx +0 -38
- package/src/config.ts +0 -4
- package/src/constants/errorConstants.ts +0 -21
- package/src/constants.ts +0 -4
- package/src/global.d.ts +0 -11
- package/src/hooks/useChatbotEvents.ts +0 -93
- package/src/index.tsx +0 -10
- package/src/openChatbot.ts +0 -11
- package/src/openChatbot.tsx +0 -0
- package/src/services/ErrorTrackingService.ts +0 -217
- package/src/types/events.ts +0 -25
- package/src/types/react-native-flipper-performance-plugin.d.ts +0 -3
- package/src/types/react-native-globals.d.ts +0 -10
- package/src/utils/cookieUtils.ts +0 -7
- package/src/utils/debugConfig.ts +0 -56
- package/src/utils/debugMenu.ts +0 -14
- package/src/utils/errorHandler.ts +0 -58
- package/src/utils/logger.ts +0 -14
- package/src/utils/systemInfo.ts +0 -84
- package/src/utils/webViewStorage.ts +0 -62
- package/src/version.ts +0 -2
- package/src/versions/version.dev.ts +0 -2
- package/src/versions/version.production.ts +0 -2
- package/src/versions/version.staging.ts +0 -2
package/src/ChatbotWebview.tsx
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// File: src/ChatbotWebview.tsx
|
|
2
|
-
import React, { useEffect, useState } from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
import { WebView } from "react-native-webview";
|
|
5
|
-
import { BASE_CHATBOT_URL } from "./constants";
|
|
6
|
-
import LoadingIndicator from "./LoadingIndicator";
|
|
7
|
-
|
|
8
|
-
interface ChatbotWebviewProps {
|
|
9
|
-
chatbotId: string;
|
|
10
|
-
additionalParams?: Record<string, string>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const constructUrl = (
|
|
14
|
-
chatbotId: string,
|
|
15
|
-
additionalParams: Record<string, string> = {}
|
|
16
|
-
): string => {
|
|
17
|
-
const params = new URLSearchParams({ id: chatbotId, ...additionalParams });
|
|
18
|
-
return `${BASE_CHATBOT_URL}?${params.toString()}`;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const ChatbotWebview: React.FC<ChatbotWebviewProps> = ({
|
|
22
|
-
chatbotId,
|
|
23
|
-
additionalParams,
|
|
24
|
-
}) => {
|
|
25
|
-
const [url, setUrl] = useState<string>("");
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
setUrl(constructUrl(chatbotId, additionalParams));
|
|
29
|
-
}, [chatbotId, additionalParams]);
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<View style={{ flex: 1 }}>
|
|
33
|
-
{url ? (
|
|
34
|
-
<WebView
|
|
35
|
-
source={{ uri: url }}
|
|
36
|
-
startInLoadingState={true}
|
|
37
|
-
renderLoading={() => <LoadingIndicator />}
|
|
38
|
-
/>
|
|
39
|
-
) : (
|
|
40
|
-
<LoadingIndicator />
|
|
41
|
-
)}
|
|
42
|
-
</View>
|
|
43
|
-
);
|
|
44
|
-
};
|