@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.
Files changed (98) hide show
  1. package/lib/commonjs/Chatbotsdk.js +3 -3
  2. package/lib/commonjs/Chatbotsdk.js.map +1 -1
  3. package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js +2 -0
  4. package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js.map +1 -0
  5. package/lib/commonjs/FloatingButton/launchers/TextLauncher.js +2 -0
  6. package/lib/commonjs/FloatingButton/launchers/TextLauncher.js.map +1 -0
  7. package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js +2 -0
  8. package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js.map +1 -0
  9. package/lib/commonjs/FloatingButton.js +1 -1
  10. package/lib/commonjs/FloatingButton.js.map +1 -1
  11. package/lib/commonjs/config.js +1 -1
  12. package/lib/commonjs/config.js.map +1 -1
  13. package/lib/commonjs/constants/fontStyles.js +2 -0
  14. package/lib/commonjs/constants/fontStyles.js.map +1 -0
  15. package/lib/commonjs/constants.js +1 -1
  16. package/lib/commonjs/constants.js.map +1 -1
  17. package/lib/commonjs/openChatbot.js +1 -2
  18. package/lib/commonjs/openChatbot.js.map +1 -1
  19. package/lib/commonjs/utils/animations.js +2 -0
  20. package/lib/commonjs/utils/animations.js.map +1 -0
  21. package/lib/commonjs/utils/colorUtils.js +2 -0
  22. package/lib/commonjs/utils/colorUtils.js.map +1 -0
  23. package/lib/commonjs/versions/version.staging.js +1 -1
  24. package/lib/module/Chatbotsdk.js +3 -3
  25. package/lib/module/Chatbotsdk.js.map +1 -1
  26. package/lib/module/FloatingButton/launchers/ImageLauncher.js +2 -0
  27. package/lib/module/FloatingButton/launchers/ImageLauncher.js.map +1 -0
  28. package/lib/module/FloatingButton/launchers/TextLauncher.js +2 -0
  29. package/lib/module/FloatingButton/launchers/TextLauncher.js.map +1 -0
  30. package/lib/module/FloatingButton/launchers/TextualImageLauncher.js +2 -0
  31. package/lib/module/FloatingButton/launchers/TextualImageLauncher.js.map +1 -0
  32. package/lib/module/FloatingButton.js +1 -1
  33. package/lib/module/FloatingButton.js.map +1 -1
  34. package/lib/module/config.js +1 -1
  35. package/lib/module/config.js.map +1 -1
  36. package/lib/module/constants/fontStyles.js +2 -0
  37. package/lib/module/constants/fontStyles.js.map +1 -0
  38. package/lib/module/constants.js +1 -1
  39. package/lib/module/constants.js.map +1 -1
  40. package/lib/module/openChatbot.js.map +1 -1
  41. package/lib/module/utils/animations.js +2 -0
  42. package/lib/module/utils/animations.js.map +1 -0
  43. package/lib/module/utils/colorUtils.js +2 -0
  44. package/lib/module/utils/colorUtils.js.map +1 -0
  45. package/lib/module/versions/version.staging.js +1 -1
  46. package/lib/typescript/Chatbotsdk.d.ts.map +1 -1
  47. package/lib/typescript/FloatingButton/launchers/ImageLauncher.d.ts +10 -0
  48. package/lib/typescript/FloatingButton/launchers/ImageLauncher.d.ts.map +1 -0
  49. package/lib/typescript/FloatingButton/launchers/TextLauncher.d.ts +10 -0
  50. package/lib/typescript/FloatingButton/launchers/TextLauncher.d.ts.map +1 -0
  51. package/lib/typescript/FloatingButton/launchers/TextualImageLauncher.d.ts +10 -0
  52. package/lib/typescript/FloatingButton/launchers/TextualImageLauncher.d.ts.map +1 -0
  53. package/lib/typescript/FloatingButton.d.ts +2 -0
  54. package/lib/typescript/FloatingButton.d.ts.map +1 -1
  55. package/lib/typescript/constants/fontStyles.d.ts +3 -0
  56. package/lib/typescript/constants/fontStyles.d.ts.map +1 -0
  57. package/lib/typescript/utils/animations.d.ts +38 -0
  58. package/lib/typescript/utils/animations.d.ts.map +1 -0
  59. package/lib/typescript/utils/colorUtils.d.ts +2 -0
  60. package/lib/typescript/utils/colorUtils.d.ts.map +1 -0
  61. package/lib/typescript/versions/version.staging.d.ts +1 -1
  62. package/package.json +2 -2
  63. package/lib/commonjs/ChatbotWebview.js +0 -2
  64. package/lib/commonjs/ChatbotWebview.js.map +0 -1
  65. package/lib/module/ChatbotWebview.js +0 -2
  66. package/lib/module/ChatbotWebview.js.map +0 -1
  67. package/lib/typescript/ChatbotWebview.d.ts +0 -8
  68. package/lib/typescript/ChatbotWebview.d.ts.map +0 -1
  69. package/src/ChatbotWebview.tsx +0 -44
  70. package/src/Chatbotsdk.tsx +0 -778
  71. package/src/FloatingButton.tsx +0 -88
  72. package/src/LoadingIndicator.tsx +0 -11
  73. package/src/Toast.tsx +0 -65
  74. package/src/components/DebugButton.tsx +0 -46
  75. package/src/components/ErrorBoundary.tsx +0 -38
  76. package/src/config.ts +0 -4
  77. package/src/constants/errorConstants.ts +0 -21
  78. package/src/constants.ts +0 -4
  79. package/src/global.d.ts +0 -11
  80. package/src/hooks/useChatbotEvents.ts +0 -93
  81. package/src/index.tsx +0 -10
  82. package/src/openChatbot.ts +0 -11
  83. package/src/openChatbot.tsx +0 -0
  84. package/src/services/ErrorTrackingService.ts +0 -217
  85. package/src/types/events.ts +0 -25
  86. package/src/types/react-native-flipper-performance-plugin.d.ts +0 -3
  87. package/src/types/react-native-globals.d.ts +0 -10
  88. package/src/utils/cookieUtils.ts +0 -7
  89. package/src/utils/debugConfig.ts +0 -56
  90. package/src/utils/debugMenu.ts +0 -14
  91. package/src/utils/errorHandler.ts +0 -58
  92. package/src/utils/logger.ts +0 -14
  93. package/src/utils/systemInfo.ts +0 -84
  94. package/src/utils/webViewStorage.ts +0 -62
  95. package/src/version.ts +0 -2
  96. package/src/versions/version.dev.ts +0 -2
  97. package/src/versions/version.production.ts +0 -2
  98. package/src/versions/version.staging.ts +0 -2
@@ -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
- };