@robylon/react-native-sdk 2.0.19-staging.20 → 2.0.19-staging.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 +30 -3
- package/lib/commonjs/Chatbotsdk.js.map +1 -1
- package/lib/commonjs/components/ChatbotWebView.js +46 -0
- package/lib/commonjs/components/ChatbotWebView.js.map +1 -0
- package/lib/commonjs/versions/version.staging.js +1 -1
- package/lib/module/Chatbotsdk.js +30 -3
- package/lib/module/Chatbotsdk.js.map +1 -1
- package/lib/module/components/ChatbotWebView.js +46 -0
- package/lib/module/components/ChatbotWebView.js.map +1 -0
- package/lib/module/openChatbot.js +1 -2
- package/lib/module/openChatbot.js.map +1 -1
- package/lib/module/versions/version.staging.js +1 -1
- package/lib/typescript/Chatbotsdk.d.ts.map +1 -1
- package/lib/typescript/components/ChatbotWebView.d.ts +8 -0
- package/lib/typescript/components/ChatbotWebView.d.ts.map +1 -0
- package/lib/typescript/versions/version.staging.d.ts +1 -1
- package/package.json +1 -1
- package/src/Chatbotsdk.tsx +46 -2
- package/src/components/ChatbotWebView.tsx +82 -0
- package/src/versions/version.staging.ts +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _FloatingButton=_interopRequireDefault(require("./FloatingButton"));var _constants=require("./constants");var _version=require("./version");var _systemInfo=require("./utils/systemInfo");var _useChatbotEvents2=require("./hooks/useChatbotEvents");var _events=require("./types/events");var _logger=require("./utils/logger");var _debugConfig=require("./utils/debugConfig");var _DebugButton=_interopRequireDefault(require("./components/DebugButton"));var _ErrorBoundary=require("./components/ErrorBoundary");var _errorConstants=require("./constants/errorConstants");var _ErrorTrackingService=require("./services/ErrorTrackingService");var _cookieUtils=require("./utils/cookieUtils");var _webViewStorage=require("./utils/webViewStorage");var _ChatbotWebView=_interopRequireDefault(require("./components/ChatbotWebView"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/Chatbotsdk.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Chatbot=function Chatbot(_ref){var api_key=_ref.api_key,user_id=_ref.user_id,user_token=_ref.user_token,_ref$show_floating_bu=_ref.show_floating_button,show_floating_button=_ref$show_floating_bu===void 0?true:_ref$show_floating_bu,onEvent=_ref.onEvent,onMessage=_ref.onMessage,_ref$isFullScreen=_ref.isFullScreen,isFullScreen=_ref$isFullScreen===void 0?true:_ref$isFullScreen,_ref$enableAnimation=_ref.enableAnimation,enableAnimation=_ref$enableAnimation===void 0?true:_ref$enableAnimation,onOpen=_ref.onOpen,onClose=_ref.onClose,user_profile=_ref.user_profile;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isWebViewVisible=_useState2[0],setIsWebViewVisible=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),chatbotConfig=_useState4[0],setChatbotConfig=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2.default)(_useState5,2),loading=_useState6[0],setLoading=_useState6[1];var webViewRef=(0,_react.useRef)(null);var fadeAnim=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var isFirstLoadRef=(0,_react.useRef)(true);var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),toastVisible=_useState8[0],setToastVisible=_useState8[1];var _useState9=(0,_react.useState)(""),_useState10=(0,_slicedToArray2.default)(_useState9,2),toastMessage=_useState10[0],setToastMessage=_useState10[1];var _useState11=(0,_react.useState)(),_useState12=(0,_slicedToArray2.default)(_useState11,2),effectiveUserId=_useState12[0],setEffectiveUserId=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=(0,_slicedToArray2.default)(_useState13,2),isStorageReady=_useState14[0],setIsStorageReady=_useState14[1];var pendingStorageOps=(0,_react.useRef)([]);var memoryCache=(0,_react.useRef)({});var _useState15=(0,_react.useState)({os:"",browser:""}),_useState16=(0,_slicedToArray2.default)(_useState15,2),systemInfo=_useState16[0],setSystemInfo=_useState16[1];var chatbotConfigForEvents=(0,_react.useMemo)(function(){return{userId:effectiveUserId,isAnonymous:!user_id&&user_id!==0};},[effectiveUserId,user_id]);var _useChatbotEvents=(0,_useChatbotEvents2.useChatbotEvents)({api_key:api_key,chatbotConfig:chatbotConfigForEvents!=null?chatbotConfigForEvents:{},user_profile:user_profile,onEvent:onEvent,systemInfo:systemInfo!=null?systemInfo:{os:"",browser:""}}),emitEvent=_useChatbotEvents.emitEvent,onInternalEvent=_useChatbotEvents.onInternalEvent;var triggerAppInit=function triggerAppInit(){if(webViewRef.current){webViewRef.current.injectJavaScript(`
|
|
2
2
|
// Trigger APP_READY equivalent
|
|
3
3
|
window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'APP_READY' }));
|
|
4
4
|
true;
|
|
5
5
|
`);}};var executeStorageOp=(0,_react.useCallback)(function(operation){if(isStorageReady){operation();}else{pendingStorageOps.current.push(operation);}},[isStorageReady]);var handleMessage=(0,_react.useCallback)(function(event){var _webViewRef$current;var data=event.nativeEvent.data;try{var parsedData=JSON.parse(data);if(Object.values(_webViewStorage.StorageMessageType).includes(parsedData.type)){var storageMessage=parsedData;switch(storageMessage.type){case _webViewStorage.StorageMessageType.STORAGE_READY:setIsStorageReady(true);pendingStorageOps.current.forEach(function(op){return op();});pendingStorageOps.current=[];(_webViewRef$current=webViewRef.current)==null?void 0:_webViewRef$current.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));break;case _webViewStorage.StorageMessageType.STORAGE_RESPONSE:if(storageMessage.key&&storageMessage.value){memoryCache.current[storageMessage.key]=storageMessage.value;if(storageMessage.key==="rblyn_anon"){setEffectiveUserId(storageMessage.value);}}break;case _webViewStorage.StorageMessageType.STORAGE_ERROR:_logger.logger.error("WebView storage error:",storageMessage.error);break;}return;}if(__DEV__){if((parsedData==null?void 0:parsedData.type)==="CONSOLE"){console.log(`WebView ${parsedData==null?void 0:parsedData.level}:`,parsedData==null?void 0:parsedData.data);return;}if((parsedData==null?void 0:parsedData.type)==="ERROR"){console.error("WebView Error:",parsedData==null?void 0:parsedData.data);return;}}if((parsedData==null?void 0:parsedData.type)==="SYSTEM_INFO"){var _parsedData$data;setSystemInfo((_parsedData$data=parsedData==null?void 0:parsedData.data)!=null?_parsedData$data:{os:"",browser:""});return;}if((parsedData==null?void 0:parsedData.type)==="APP_READY"){emitEvent(_events.ChatbotEventType.CHATBOT_APP_READY);if(webViewRef.current&&isWebViewVisible){var _webViewRef$current2,_webViewRef$current3;(_webViewRef$current2=webViewRef.current)==null?void 0:_webViewRef$current2.injectJavaScript((0,_systemInfo.getBrowserAndOSInfoScript)());var messageData={name:"registerUserId",action:"registerUserId",data:{userId:effectiveUserId,token:user_token?`${user_token}`:undefined,userProfile:Object.assign({},user_profile,(0,_systemInfo.getSystemInfo)(systemInfo))}};_logger.logger.debug("messageData====>",JSON.stringify(messageData));(_webViewRef$current3=webViewRef.current)==null?void 0:_webViewRef$current3.injectJavaScript(`
|
|
6
6
|
window.postMessage(${JSON.stringify({name:"openFrame",domain:"app-domain.com"})}, '*');
|
|
7
7
|
window.postMessage(${JSON.stringify(messageData)}, '*');
|
|
8
|
-
`);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$config,_orgInfo$brand_config,_orgInfo$config2;setChatbotConfig({brand_color:(orgInfo==null?void 0:(_orgInfo$config=orgInfo.config)==null?void 0:_orgInfo$config.brand_colour)||"#007AFF",image_url:(orgInfo==null?void 0:(_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config.launcher_logo_url)||"",welcome_message:(orgInfo==null?void 0:(_orgInfo$config2=orgInfo.config)==null?void 0:_orgInfo$config2.welcome_message)||""});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to fetch chatbot configuration"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.NETWORK_ERROR,context:{api_key:api_key,user_id:user_id}});}finally{setLoading(false);}});return function fetchChatbotConfig(){return _ref3.apply(this,arguments);};}();if(api_key&&effectiveUserId){fetchChatbotConfig();}},[api_key,effectiveUserId,user_token]);function constructUrl(){if(!effectiveUserId)return"";var params=new URLSearchParams({id:api_key});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL,_version.SDK_VERSION);return"https://demo.robylon.ai/chat/public/RG5x9i1fvk/";}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_color,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{height:isWebViewVisible?"100%":0}],pointerEvents:"auto",children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(
|
|
8
|
+
`);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$config,_orgInfo$brand_config,_orgInfo$config2;setChatbotConfig({brand_color:(orgInfo==null?void 0:(_orgInfo$config=orgInfo.config)==null?void 0:_orgInfo$config.brand_colour)||"#007AFF",image_url:(orgInfo==null?void 0:(_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config.launcher_logo_url)||"",welcome_message:(orgInfo==null?void 0:(_orgInfo$config2=orgInfo.config)==null?void 0:_orgInfo$config2.welcome_message)||""});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to fetch chatbot configuration"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.NETWORK_ERROR,context:{api_key:api_key,user_id:user_id}});}finally{setLoading(false);}});return function fetchChatbotConfig(){return _ref3.apply(this,arguments);};}();if(api_key&&effectiveUserId){fetchChatbotConfig();}},[api_key,effectiveUserId,user_token]);function constructUrl(){if(!effectiveUserId)return"";var params=new URLSearchParams({id:api_key});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL,_version.SDK_VERSION);return"https://demo.robylon.ai/chat/public/RG5x9i1fvk/";}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);var userAgent=_reactNative.Platform.select({android:"Mozilla/5.0 (Linux; Android 10; Android SDK built for x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36",ios:"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"});return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_color,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{height:isWebViewVisible?"100%":0}],pointerEvents:"auto",children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_ChatbotWebView.default,{ref:webViewRef,source:{uri:constructUrl()},onMessage:handleMessage,onDebugMessage:function onDebugMessage(message){console.log("WebView Debug:",message);},style:styles.webview,allowsInlineMediaPlayback:true,mediaPlaybackRequiresUserAction:false,allowFileAccess:false,geolocationEnabled:false,javaScriptEnabled:true,domStorageEnabled:true,cacheEnabled:true,scrollEnabled:true,bounces:false,onShouldStartLoadWithRequest:function onShouldStartLoadWithRequest(request){return request.url.startsWith(_constants.BASE_CHATBOT_URL);},startInLoadingState:isFirstLoadRef.current,onLoadEnd:function onLoadEnd(){var _webViewRef$current6;if(__DEV__){(0,_debugConfig.enableWebViewDebug)(webViewRef);}(_webViewRef$current6=webViewRef.current)==null?void 0:_webViewRef$current6.injectJavaScript(`
|
|
9
9
|
if (!document.querySelector('meta[name="viewport"]')) {
|
|
10
10
|
var meta = document.createElement('meta');
|
|
11
11
|
meta.name = 'viewport';
|
|
@@ -71,6 +71,33 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// Add touch event handlers
|
|
75
|
+
document.addEventListener('touchstart', function(e) {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
}, true);
|
|
78
|
+
|
|
79
|
+
// Improve click handling
|
|
80
|
+
document.addEventListener('click', function(e) {
|
|
81
|
+
const clickedElement = e.target;
|
|
82
|
+
console.log('Clicked element:', clickedElement);
|
|
83
|
+
|
|
84
|
+
// Log the event for debugging
|
|
85
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
86
|
+
type: 'CONSOLE',
|
|
87
|
+
level: 'debug',
|
|
88
|
+
data: 'Click event fired on: ' + clickedElement.className
|
|
89
|
+
}));
|
|
90
|
+
}, true);
|
|
91
|
+
|
|
74
92
|
true;
|
|
75
|
-
`);isFirstLoadRef.current=false;},onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});}
|
|
93
|
+
`);isFirstLoadRef.current=false;},onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});},userAgent:userAgent,originWhitelist:["*"],mixedContentMode:"always",onContentProcessDidTerminate:function onContentProcessDidTerminate(){var _webViewRef$current7;(_webViewRef$current7=webViewRef.current)==null?void 0:_webViewRef$current7.reload();},injectedJavaScriptBeforeContentLoaded:`
|
|
94
|
+
window.onerror = function(message, source, lineno, colno, error) {
|
|
95
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
96
|
+
type: 'ERROR',
|
|
97
|
+
data: {message, source, lineno, colno}
|
|
98
|
+
}));
|
|
99
|
+
return true;
|
|
100
|
+
};
|
|
101
|
+
true;
|
|
102
|
+
`})})})]}),__DEV__&&(0,_jsxRuntime.jsx)(_DebugButton.default,{})]})});};var styles=_reactNative.StyleSheet.create({mainContainer:{flex:1,position:"relative"},webViewWrapper:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden",zIndex:100},fullScreenContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"white",zIndex:100},inlineContainer:{flex:1,backgroundColor:"white"},webview:{flex:1,backgroundColor:"white"}});var _default=exports.default=Chatbot;
|
|
76
103
|
//# sourceMappingURL=Chatbotsdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","_version","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Chatbot","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$config","_orgInfo$brand_config","_orgInfo$config2","brand_color","config","brand_colour","image_url","brand_config","launcher_logo_url","welcome_message","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","SDK_VERSION","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","pointerEvents","WebView","nestedScrollEnabled","ref","source","uri","webview","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current6","enableWebViewDebug","onError","syntheticEvent","description","code","StyleSheet","create","flex","position","webViewWrapper","top","left","right","bottom","overflow","zIndex","fullScreenContainer","backgroundColor","inlineContainer","_default","exports"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"iWAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,eAAA,CAAAC,sBAAA,CAAAJ,OAAA,sBACA,IAAAK,UAAA,CAAAL,OAAA,gBACA,IAAAM,QAAA,CAAAN,OAAA,cACA,IAAAO,WAAA,CAAAP,OAAA,uBACA,IAAAQ,kBAAA,CAAAR,OAAA,6BACA,IAAAS,OAAA,CAAAT,OAAA,mBACA,IAAAU,OAAA,CAAAV,OAAA,mBACA,IAAAW,YAAA,CAAAX,OAAA,wBACA,IAAAY,YAAA,CAAAR,sBAAA,CAAAJ,OAAA,8BACA,IAAAa,cAAA,CAAAb,OAAA,+BACA,IAAAc,eAAA,CAAAd,OAAA,+BAMA,IAAAe,qBAAA,CAAAf,OAAA,oCACA,IAAAgB,YAAA,CAAAhB,OAAA,wBACA,IAAAiB,eAAA,CAAAjB,OAAA,2BAKgC,IAAAkB,WAAA,CAAAlB,OAAA,0BAAAmB,KAAA,MAAAC,YAAA,+FAAAC,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GAAG,CAAE/J,WAAW,CAAC+J,GAAG,CACpBS,IAAI,CAAExK,WAAW,CAACwK,IACpB,CACF,CACF,CAAC,CACH,CAAE,CACH,CAAC,CACW,CAAC,CAEZ,CAAC,EACP,CACH,CAEApJ,OAAO,EAAI,GAAA1H,WAAA,CAAAqO,GAAA,EAAC3O,YAAA,CAAAe,OAAW,GAAE,CAAC,EACvB,CAAC,CACM,CAAC,CAEpB,CAAC,CAED,GAAM,CAAAmO,MAAM,CAAGmC,uBAAU,CAACC,MAAM,CAAC,CAC/BnC,aAAa,CAAE,CACboC,IAAI,CAAE,CAAC,CACPC,QAAQ,CAAE,UACZ,CAAC,CACDC,cAAc,CAAE,CACdD,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,QAAQ,CAClBC,MAAM,CAAE,GACV,CAAC,CACDC,mBAAmB,CAAE,CACnBR,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTI,eAAe,CAAE,OAAO,CACxBF,MAAM,CAAE,GACV,CAAC,CACDG,eAAe,CAAE,CACfX,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CAAC,CACDlC,OAAO,CAAE,CACPwB,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CACF,CAAC,CAAC,CAAC,IAAAE,QAAA,CAAAC,OAAA,CAAArR,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_FloatingButton","_interopRequireDefault","_constants","_version","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_ChatbotWebView","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Chatbot","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$config","_orgInfo$brand_config","_orgInfo$config2","brand_color","config","brand_colour","image_url","brand_config","launcher_logo_url","welcome_message","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","SDK_VERSION","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","userAgent","select","android","ios","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","pointerEvents","ref","source","uri","onDebugMessage","message","webview","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current6","enableWebViewDebug","onError","syntheticEvent","description","code","originWhitelist","mixedContentMode","onContentProcessDidTerminate","_webViewRef$current7","reload","injectedJavaScriptBeforeContentLoaded","StyleSheet","create","flex","position","webViewWrapper","top","left","right","bottom","overflow","zIndex","fullScreenContainer","backgroundColor","inlineContainer","_default","exports"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"iWAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBAUA,IAAAE,eAAA,CAAAC,sBAAA,CAAAH,OAAA,sBACA,IAAAI,UAAA,CAAAJ,OAAA,gBACA,IAAAK,QAAA,CAAAL,OAAA,cACA,IAAAM,WAAA,CAAAN,OAAA,uBACA,IAAAO,kBAAA,CAAAP,OAAA,6BACA,IAAAQ,OAAA,CAAAR,OAAA,mBACA,IAAAS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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CACkBlC,cAAc,CAACD,OAAO,CAAG,KAAK,CAChC,CAAE,CACFqN,OAAO,CAAE,QAAT,CAAAA,OAAOA,CAAGC,cAAc,CAAK,CAC3B,GAAQ,CAAA1K,WAAW,CAAK0K,cAAc,CAA9B1K,WAAW,CACnB8C,kCAAY,CAACC,UAAU,CACrB,GAAI,CAAAC,KAAK,CAAChD,WAAW,CAAC2K,WAAW,CAAC,CAClC,gBAAgB,CAChB,CACEpK,IAAI,CAAE0C,0BAAU,CAACC,aAAa,CAC9BC,OAAO,CAAE,CACPgH,GAAG,CAAEnK,WAAW,CAACmK,GAAG,CACpBS,IAAI,CAAE5K,WAAW,CAAC4K,IACpB,CACF,CACF,CAAC,CACH,CAAE,CACF7C,SAAS,CAAEA,SAAU,CACrB8C,eAAe,CAAE,CAAC,GAAG,CAAE,CACvBC,gBAAgB,CAAC,QAAQ,CACzBC,4BAA4B,CAAE,QAA9B,CAAAA,4BAA4BA,CAAA,CAAQ,KAAAC,oBAAA,CAClC,CAAAA,oBAAA,CAAAjO,UAAU,CAACK,OAAO,eAAlB4N,oBAAA,CAAoBC,MAAM,CAAC,CAAC,CAC9B,CAAE,CACFC,qCAAqC,CAAE;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAoB,CACH,CAAC,CACW,CAAC,CAEZ,CAAC,EACP,CACH,CAEA9J,OAAO,EAAI,GAAA1H,WAAA,CAAAyO,GAAA,EAAChP,YAAA,CAAAgB,OAAW,GAAE,CAAC,EACvB,CAAC,CACM,CAAC,CAEpB,CAAC,CAED,GAAM,CAAAuO,MAAM,CAAGyC,uBAAU,CAACC,MAAM,CAAC,CAC/BzC,aAAa,CAAE,CACb0C,IAAI,CAAE,CAAC,CACPC,QAAQ,CAAE,UACZ,CAAC,CACDC,cAAc,CAAE,CACdD,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,QAAQ,CAClBC,MAAM,CAAE,GACV,CAAC,CACDC,mBAAmB,CAAE,CACnBR,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTI,eAAe,CAAE,OAAO,CACxBF,MAAM,CAAE,GACV,CAAC,CACDG,eAAe,CAAE,CACfX,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CAAC,CACDxC,OAAO,CAAE,CACP8B,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CACF,CAAC,CAAC,CAAC,IAAAE,QAAA,CAAAC,OAAA,CAAA/R,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNativeWebview=require("react-native-webview");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onDebugMessage"];var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/components/ChatbotWebView.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ChatbotWebView=(0,_react.forwardRef)(function(props,ref){var onDebugMessage=props.onDebugMessage,restProps=(0,_objectWithoutProperties2.default)(props,_excluded);var defaultInjectedJavaScript=`
|
|
2
|
+
// Override default touch handling
|
|
3
|
+
document.addEventListener('touchstart', function(e) {
|
|
4
|
+
const target = e.target;
|
|
5
|
+
if (target.tagName === 'BUTTON' || target.closest('button')) {
|
|
6
|
+
e.stopPropagation();
|
|
7
|
+
}
|
|
8
|
+
}, true);
|
|
9
|
+
|
|
10
|
+
// Add click debugging
|
|
11
|
+
document.addEventListener('click', function(e) {
|
|
12
|
+
const target = e.target;
|
|
13
|
+
console.log('Click detected on:', target.tagName, target.className);
|
|
14
|
+
|
|
15
|
+
// Force pointer events
|
|
16
|
+
const elements = document.querySelectorAll('*');
|
|
17
|
+
elements.forEach(el => {
|
|
18
|
+
const style = window.getComputedStyle(el);
|
|
19
|
+
if (style.pointerEvents === 'none') {
|
|
20
|
+
el.style.pointerEvents = 'auto';
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}, true);
|
|
24
|
+
|
|
25
|
+
// Ensure buttons are clickable
|
|
26
|
+
const makeClickable = () => {
|
|
27
|
+
const buttons = document.querySelectorAll('button');
|
|
28
|
+
buttons.forEach(button => {
|
|
29
|
+
button.style.cursor = 'pointer';
|
|
30
|
+
button.style.pointerEvents = 'auto';
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Run initially and observe DOM changes
|
|
35
|
+
makeClickable();
|
|
36
|
+
new MutationObserver(makeClickable).observe(document.body, {
|
|
37
|
+
childList: true,
|
|
38
|
+
subtree: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
true;
|
|
42
|
+
`;return(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,Object.assign({ref:ref},restProps,{injectedJavaScript:`
|
|
43
|
+
${defaultInjectedJavaScript}
|
|
44
|
+
${props.injectedJavaScript||""}
|
|
45
|
+
`,onMessage:function onMessage(event){props.onMessage==null?void 0:props.onMessage(event);try{var data=JSON.parse(event.nativeEvent.data);if(data.type==="CONSOLE"){onDebugMessage==null?void 0:onDebugMessage(data.data);}}catch(e){}},style:[{opacity:0.99},props.style],bounces:false,showsHorizontalScrollIndicator:false,showsVerticalScrollIndicator:false}));});var _default=exports.default=ChatbotWebView;
|
|
46
|
+
//# sourceMappingURL=ChatbotWebView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeWebview","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ChatbotWebView","forwardRef","props","ref","onDebugMessage","restProps","_objectWithoutProperties2","defaultInjectedJavaScript","jsx","WebView","assign","injectedJavaScript","onMessage","event","data","JSON","parse","nativeEvent","type","style","opacity","bounces","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","_default","exports"],"sourceRoot":"../../../src","sources":["components/ChatbotWebView.tsx"],"mappings":"mRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,mBAAA,CAAAD,OAAA,yBAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,SAAA,wBAAAC,KAAA,MAAA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
Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.21';
|
|
2
2
|
//# sourceMappingURL=version.staging.js.map
|
package/lib/module/Chatbotsdk.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _FloatingButton=_interopRequireDefault(require("./FloatingButton"));var _constants=require("./constants");var _version=require("./version");var _systemInfo=require("./utils/systemInfo");var _useChatbotEvents2=require("./hooks/useChatbotEvents");var _events=require("./types/events");var _logger=require("./utils/logger");var _debugConfig=require("./utils/debugConfig");var _DebugButton=_interopRequireDefault(require("./components/DebugButton"));var _ErrorBoundary=require("./components/ErrorBoundary");var _errorConstants=require("./constants/errorConstants");var _ErrorTrackingService=require("./services/ErrorTrackingService");var _cookieUtils=require("./utils/cookieUtils");var _webViewStorage=require("./utils/webViewStorage");var _ChatbotWebView=_interopRequireDefault(require("./components/ChatbotWebView"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/Chatbotsdk.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Chatbot=function Chatbot(_ref){var api_key=_ref.api_key,user_id=_ref.user_id,user_token=_ref.user_token,_ref$show_floating_bu=_ref.show_floating_button,show_floating_button=_ref$show_floating_bu===void 0?true:_ref$show_floating_bu,onEvent=_ref.onEvent,onMessage=_ref.onMessage,_ref$isFullScreen=_ref.isFullScreen,isFullScreen=_ref$isFullScreen===void 0?true:_ref$isFullScreen,_ref$enableAnimation=_ref.enableAnimation,enableAnimation=_ref$enableAnimation===void 0?true:_ref$enableAnimation,onOpen=_ref.onOpen,onClose=_ref.onClose,user_profile=_ref.user_profile;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isWebViewVisible=_useState2[0],setIsWebViewVisible=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),chatbotConfig=_useState4[0],setChatbotConfig=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2.default)(_useState5,2),loading=_useState6[0],setLoading=_useState6[1];var webViewRef=(0,_react.useRef)(null);var fadeAnim=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var isFirstLoadRef=(0,_react.useRef)(true);var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),toastVisible=_useState8[0],setToastVisible=_useState8[1];var _useState9=(0,_react.useState)(""),_useState10=(0,_slicedToArray2.default)(_useState9,2),toastMessage=_useState10[0],setToastMessage=_useState10[1];var _useState11=(0,_react.useState)(),_useState12=(0,_slicedToArray2.default)(_useState11,2),effectiveUserId=_useState12[0],setEffectiveUserId=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=(0,_slicedToArray2.default)(_useState13,2),isStorageReady=_useState14[0],setIsStorageReady=_useState14[1];var pendingStorageOps=(0,_react.useRef)([]);var memoryCache=(0,_react.useRef)({});var _useState15=(0,_react.useState)({os:"",browser:""}),_useState16=(0,_slicedToArray2.default)(_useState15,2),systemInfo=_useState16[0],setSystemInfo=_useState16[1];var chatbotConfigForEvents=(0,_react.useMemo)(function(){return{userId:effectiveUserId,isAnonymous:!user_id&&user_id!==0};},[effectiveUserId,user_id]);var _useChatbotEvents=(0,_useChatbotEvents2.useChatbotEvents)({api_key:api_key,chatbotConfig:chatbotConfigForEvents!=null?chatbotConfigForEvents:{},user_profile:user_profile,onEvent:onEvent,systemInfo:systemInfo!=null?systemInfo:{os:"",browser:""}}),emitEvent=_useChatbotEvents.emitEvent,onInternalEvent=_useChatbotEvents.onInternalEvent;var triggerAppInit=function triggerAppInit(){if(webViewRef.current){webViewRef.current.injectJavaScript(`
|
|
2
2
|
// Trigger APP_READY equivalent
|
|
3
3
|
window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'APP_READY' }));
|
|
4
4
|
true;
|
|
5
5
|
`);}};var executeStorageOp=(0,_react.useCallback)(function(operation){if(isStorageReady){operation();}else{pendingStorageOps.current.push(operation);}},[isStorageReady]);var handleMessage=(0,_react.useCallback)(function(event){var _webViewRef$current;var data=event.nativeEvent.data;try{var parsedData=JSON.parse(data);if(Object.values(_webViewStorage.StorageMessageType).includes(parsedData.type)){var storageMessage=parsedData;switch(storageMessage.type){case _webViewStorage.StorageMessageType.STORAGE_READY:setIsStorageReady(true);pendingStorageOps.current.forEach(function(op){return op();});pendingStorageOps.current=[];(_webViewRef$current=webViewRef.current)==null?void 0:_webViewRef$current.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));break;case _webViewStorage.StorageMessageType.STORAGE_RESPONSE:if(storageMessage.key&&storageMessage.value){memoryCache.current[storageMessage.key]=storageMessage.value;if(storageMessage.key==="rblyn_anon"){setEffectiveUserId(storageMessage.value);}}break;case _webViewStorage.StorageMessageType.STORAGE_ERROR:_logger.logger.error("WebView storage error:",storageMessage.error);break;}return;}if(__DEV__){if((parsedData==null?void 0:parsedData.type)==="CONSOLE"){console.log(`WebView ${parsedData==null?void 0:parsedData.level}:`,parsedData==null?void 0:parsedData.data);return;}if((parsedData==null?void 0:parsedData.type)==="ERROR"){console.error("WebView Error:",parsedData==null?void 0:parsedData.data);return;}}if((parsedData==null?void 0:parsedData.type)==="SYSTEM_INFO"){var _parsedData$data;setSystemInfo((_parsedData$data=parsedData==null?void 0:parsedData.data)!=null?_parsedData$data:{os:"",browser:""});return;}if((parsedData==null?void 0:parsedData.type)==="APP_READY"){emitEvent(_events.ChatbotEventType.CHATBOT_APP_READY);if(webViewRef.current&&isWebViewVisible){var _webViewRef$current2,_webViewRef$current3;(_webViewRef$current2=webViewRef.current)==null?void 0:_webViewRef$current2.injectJavaScript((0,_systemInfo.getBrowserAndOSInfoScript)());var messageData={name:"registerUserId",action:"registerUserId",data:{userId:effectiveUserId,token:user_token?`${user_token}`:undefined,userProfile:Object.assign({},user_profile,(0,_systemInfo.getSystemInfo)(systemInfo))}};_logger.logger.debug("messageData====>",JSON.stringify(messageData));(_webViewRef$current3=webViewRef.current)==null?void 0:_webViewRef$current3.injectJavaScript(`
|
|
6
6
|
window.postMessage(${JSON.stringify({name:"openFrame",domain:"app-domain.com"})}, '*');
|
|
7
7
|
window.postMessage(${JSON.stringify(messageData)}, '*');
|
|
8
|
-
`);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$config,_orgInfo$brand_config,_orgInfo$config2;setChatbotConfig({brand_color:(orgInfo==null?void 0:(_orgInfo$config=orgInfo.config)==null?void 0:_orgInfo$config.brand_colour)||"#007AFF",image_url:(orgInfo==null?void 0:(_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config.launcher_logo_url)||"",welcome_message:(orgInfo==null?void 0:(_orgInfo$config2=orgInfo.config)==null?void 0:_orgInfo$config2.welcome_message)||""});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to fetch chatbot configuration"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.NETWORK_ERROR,context:{api_key:api_key,user_id:user_id}});}finally{setLoading(false);}});return function fetchChatbotConfig(){return _ref3.apply(this,arguments);};}();if(api_key&&effectiveUserId){fetchChatbotConfig();}},[api_key,effectiveUserId,user_token]);function constructUrl(){if(!effectiveUserId)return"";var params=new URLSearchParams({id:api_key});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL,_version.SDK_VERSION);return"https://demo.robylon.ai/chat/public/RG5x9i1fvk/";}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_color,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{height:isWebViewVisible?"100%":0}],pointerEvents:"auto",children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(
|
|
8
|
+
`);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$config,_orgInfo$brand_config,_orgInfo$config2;setChatbotConfig({brand_color:(orgInfo==null?void 0:(_orgInfo$config=orgInfo.config)==null?void 0:_orgInfo$config.brand_colour)||"#007AFF",image_url:(orgInfo==null?void 0:(_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config.launcher_logo_url)||"",welcome_message:(orgInfo==null?void 0:(_orgInfo$config2=orgInfo.config)==null?void 0:_orgInfo$config2.welcome_message)||""});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to fetch chatbot configuration"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.NETWORK_ERROR,context:{api_key:api_key,user_id:user_id}});}finally{setLoading(false);}});return function fetchChatbotConfig(){return _ref3.apply(this,arguments);};}();if(api_key&&effectiveUserId){fetchChatbotConfig();}},[api_key,effectiveUserId,user_token]);function constructUrl(){if(!effectiveUserId)return"";var params=new URLSearchParams({id:api_key});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL,_version.SDK_VERSION);return"https://demo.robylon.ai/chat/public/RG5x9i1fvk/";}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);var userAgent=_reactNative.Platform.select({android:"Mozilla/5.0 (Linux; Android 10; Android SDK built for x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36",ios:"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"});return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_color,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{height:isWebViewVisible?"100%":0}],pointerEvents:"auto",children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_ChatbotWebView.default,{ref:webViewRef,source:{uri:constructUrl()},onMessage:handleMessage,onDebugMessage:function onDebugMessage(message){console.log("WebView Debug:",message);},style:styles.webview,allowsInlineMediaPlayback:true,mediaPlaybackRequiresUserAction:false,allowFileAccess:false,geolocationEnabled:false,javaScriptEnabled:true,domStorageEnabled:true,cacheEnabled:true,scrollEnabled:true,bounces:false,onShouldStartLoadWithRequest:function onShouldStartLoadWithRequest(request){return request.url.startsWith(_constants.BASE_CHATBOT_URL);},startInLoadingState:isFirstLoadRef.current,onLoadEnd:function onLoadEnd(){var _webViewRef$current6;if(__DEV__){(0,_debugConfig.enableWebViewDebug)(webViewRef);}(_webViewRef$current6=webViewRef.current)==null?void 0:_webViewRef$current6.injectJavaScript(`
|
|
9
9
|
if (!document.querySelector('meta[name="viewport"]')) {
|
|
10
10
|
var meta = document.createElement('meta');
|
|
11
11
|
meta.name = 'viewport';
|
|
@@ -71,6 +71,33 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// Add touch event handlers
|
|
75
|
+
document.addEventListener('touchstart', function(e) {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
}, true);
|
|
78
|
+
|
|
79
|
+
// Improve click handling
|
|
80
|
+
document.addEventListener('click', function(e) {
|
|
81
|
+
const clickedElement = e.target;
|
|
82
|
+
console.log('Clicked element:', clickedElement);
|
|
83
|
+
|
|
84
|
+
// Log the event for debugging
|
|
85
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
86
|
+
type: 'CONSOLE',
|
|
87
|
+
level: 'debug',
|
|
88
|
+
data: 'Click event fired on: ' + clickedElement.className
|
|
89
|
+
}));
|
|
90
|
+
}, true);
|
|
91
|
+
|
|
74
92
|
true;
|
|
75
|
-
`);isFirstLoadRef.current=false;},onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});}
|
|
93
|
+
`);isFirstLoadRef.current=false;},onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});},userAgent:userAgent,originWhitelist:["*"],mixedContentMode:"always",onContentProcessDidTerminate:function onContentProcessDidTerminate(){var _webViewRef$current7;(_webViewRef$current7=webViewRef.current)==null?void 0:_webViewRef$current7.reload();},injectedJavaScriptBeforeContentLoaded:`
|
|
94
|
+
window.onerror = function(message, source, lineno, colno, error) {
|
|
95
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
96
|
+
type: 'ERROR',
|
|
97
|
+
data: {message, source, lineno, colno}
|
|
98
|
+
}));
|
|
99
|
+
return true;
|
|
100
|
+
};
|
|
101
|
+
true;
|
|
102
|
+
`})})})]}),__DEV__&&(0,_jsxRuntime.jsx)(_DebugButton.default,{})]})});};var styles=_reactNative.StyleSheet.create({mainContainer:{flex:1,position:"relative"},webViewWrapper:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden",zIndex:100},fullScreenContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"white",zIndex:100},inlineContainer:{flex:1,backgroundColor:"white"},webview:{flex:1,backgroundColor:"white"}});var _default=exports.default=Chatbot;
|
|
76
103
|
//# sourceMappingURL=Chatbotsdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","_version","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Chatbot","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$config","_orgInfo$brand_config","_orgInfo$config2","brand_color","config","brand_colour","image_url","brand_config","launcher_logo_url","welcome_message","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","SDK_VERSION","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","pointerEvents","WebView","nestedScrollEnabled","ref","source","uri","webview","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current6","enableWebViewDebug","onError","syntheticEvent","description","code","StyleSheet","create","flex","position","webViewWrapper","top","left","right","bottom","overflow","zIndex","fullScreenContainer","backgroundColor","inlineContainer","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AC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,QAAQ,CAClBC,MAAM,CAAE,GACV,CAAC,CACDC,mBAAmB,CAAE,CACnBR,QAAQ,CAAE,UAAU,CACpBE,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTI,eAAe,CAAE,OAAO,CACxBF,MAAM,CAAE,GACV,CAAC,CACDG,eAAe,CAAE,CACfX,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CAAC,CACDlC,OAAO,CAAE,CACPwB,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CACF,CAAC,CAAC,CAAC,IAAAE,QAAA,CAAAC,OAAA,CAAArR,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_FloatingButton","_interopRequireDefault","_constants","_version","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_ChatbotWebView","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Chatbot","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$config","_orgInfo$brand_config","_orgInfo$config2","brand_color","config","brand_colour","image_url","brand_config","launcher_logo_url","welcome_message","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","SDK_VERSION","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","userAgent","select","android","ios","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","pointerEvents","ref","source","uri","onDebugMessage","message","webview","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current6","enableWebViewDebug","onError","syntheticEvent","description","code","originWhitelist","mixedContentMode","onContentProcessDidTerminate","_webViewRef$current7","reload","injectedJavaScriptBeforeContentLoaded","StyleSheet","create","flex","position","webViewWrapper","top","left","right","bottom","overflow","zIndex","fullScreenContainer","backgroundColor","inlineContainer","_default","exports"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"iWAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBAUA,IAAAE,eAAA,CAAAC,sBAAA,CAAAH,OAAA,sBACA,IAAAI,UAAA,CAAAJ,OAAA,gBACA,IAAAK,QAAA,CAAAL,OAAA,cACA,IAAAM,WAAA,CAAAN,OAAA,uBACA,IAAAO,kBAAA,CAAAP,OAAA,6BACA,IAAAQ,OAAA,CAAAR,OAAA,mBACA,IAAAS,OAAA,CAAAT,OAAA,mBACA,IAAAU,YAAA,CAAAV,OAAA,wBACA,IAAAW,YAAA,CAAAR,sBAAA,CAAAH,OAAA,8BACA,IAAAY,cAAA,CAAAZ,OAAA,+BACA,IAAAa,eAAA,CAAAb,OAAA,+BAMA,IAAAc,qBAAA,CAAAd,OAAA,oCACA,IAAAe,YAAA,CAAAf,OAAA,wBACA,IAAAgB,eAAA,CAAAhB,OAAA,2BAMA,IAAAiB,eAAA,CAAAd,sBAAA,CAAAH,OAAA,iCAAyD,IAAAkB,WAAA,CAAAlB,OAAA,0BAAAmB,KAAA,MAAAC,YAAA,+FAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA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EC,MAAM,CAACa,OAAQ,CAStBC,yBAAyB,CAAE,IAAK,CAChCC,+BAA+B,CAAE,KAAM,CACvCC,eAAe,CAAE,KAAM,CACvBC,kBAAkB,CAAE,KAAM,CAC1BC,iBAAiB,CAAE,IAAK,CACxBC,iBAAiB,CAAE,IAAK,CACxBC,YAAY,CAAE,IAAK,CACnBC,aAAa,CAAE,IAAK,CACpBC,OAAO,CAAE,KAAM,CACfC,4BAA4B,CAAE,QAA9B,CAAAA,4BAA4BA,CAAGC,OAAO,CAAK,CACzC,MAAO,CAAAA,OAAO,CAACC,GAAG,CAACC,UAAU,CAAClE,2BAAgB,CAAC,CACjD,CAAE,CACFmE,mBAAmB,CAAEhN,cAAc,CAACD,OAAQ,CAC5CkN,SAAS,CAAE,QAAX,CAAAA,SAASA,CAAA,CAAQ,KAAAC,oBAAA,CACf,GAAInJ,OAAO,CAAE,CACX,GAAAoJ,+BAAkB,EAACzN,UAAU,CAAC,CAChC,CACA,CAAAwN,oBAAA,CAAAxN,UAAU,CAACK,OAAO,eAAlBmN,oBAAA,CAAoBhL,gBAAgB,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CACkBlC,cAAc,CAACD,OAAO,CAAG,KAAK,CAChC,CAAE,CACFqN,OAAO,CAAE,QAAT,CAAAA,OAAOA,CAAGC,cAAc,CAAK,CAC3B,GAAQ,CA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E,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTI,eAAe,CAAE,OAAO,CACxBF,MAAM,CAAE,GACV,CAAC,CACDG,eAAe,CAAE,CACfX,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CAAC,CACDxC,OAAO,CAAE,CACP8B,IAAI,CAAE,CAAC,CACPU,eAAe,CAAE,OACnB,CACF,CAAC,CAAC,CAAC,IAAAE,QAAA,CAAAC,OAAA,CAAA/R,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNativeWebview=require("react-native-webview");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onDebugMessage"];var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/components/ChatbotWebView.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ChatbotWebView=(0,_react.forwardRef)(function(props,ref){var onDebugMessage=props.onDebugMessage,restProps=(0,_objectWithoutProperties2.default)(props,_excluded);var defaultInjectedJavaScript=`
|
|
2
|
+
// Override default touch handling
|
|
3
|
+
document.addEventListener('touchstart', function(e) {
|
|
4
|
+
const target = e.target;
|
|
5
|
+
if (target.tagName === 'BUTTON' || target.closest('button')) {
|
|
6
|
+
e.stopPropagation();
|
|
7
|
+
}
|
|
8
|
+
}, true);
|
|
9
|
+
|
|
10
|
+
// Add click debugging
|
|
11
|
+
document.addEventListener('click', function(e) {
|
|
12
|
+
const target = e.target;
|
|
13
|
+
console.log('Click detected on:', target.tagName, target.className);
|
|
14
|
+
|
|
15
|
+
// Force pointer events
|
|
16
|
+
const elements = document.querySelectorAll('*');
|
|
17
|
+
elements.forEach(el => {
|
|
18
|
+
const style = window.getComputedStyle(el);
|
|
19
|
+
if (style.pointerEvents === 'none') {
|
|
20
|
+
el.style.pointerEvents = 'auto';
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}, true);
|
|
24
|
+
|
|
25
|
+
// Ensure buttons are clickable
|
|
26
|
+
const makeClickable = () => {
|
|
27
|
+
const buttons = document.querySelectorAll('button');
|
|
28
|
+
buttons.forEach(button => {
|
|
29
|
+
button.style.cursor = 'pointer';
|
|
30
|
+
button.style.pointerEvents = 'auto';
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Run initially and observe DOM changes
|
|
35
|
+
makeClickable();
|
|
36
|
+
new MutationObserver(makeClickable).observe(document.body, {
|
|
37
|
+
childList: true,
|
|
38
|
+
subtree: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
true;
|
|
42
|
+
`;return(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,Object.assign({ref:ref},restProps,{injectedJavaScript:`
|
|
43
|
+
${defaultInjectedJavaScript}
|
|
44
|
+
${props.injectedJavaScript||""}
|
|
45
|
+
`,onMessage:function onMessage(event){props.onMessage==null?void 0:props.onMessage(event);try{var data=JSON.parse(event.nativeEvent.data);if(data.type==="CONSOLE"){onDebugMessage==null?void 0:onDebugMessage(data.data);}}catch(e){}},style:[{opacity:0.99},props.style],bounces:false,showsHorizontalScrollIndicator:false,showsVerticalScrollIndicator:false}));});var _default=exports.default=ChatbotWebView;
|
|
46
|
+
//# sourceMappingURL=ChatbotWebView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeWebview","_jsxRuntime","_excluded","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ChatbotWebView","forwardRef","props","ref","onDebugMessage","restProps","_objectWithoutProperties2","defaultInjectedJavaScript","jsx","WebView","assign","injectedJavaScript","onMessage","event","data","JSON","parse","nativeEvent","type","style","opacity","bounces","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","_default","exports"],"sourceRoot":"../../../src","sources":["components/ChatbotWebView.tsx"],"mappings":"mRAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAEA,IAAAC,mBAAA,CAAAD,OAAA,yBAA6D,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,SAAA,wBAAAC,KAAA,MAAAC,YAAA,8GAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAR,wBAAAQ,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,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,kBAAkB,EAAI,EAAE;AACxC,OAAQ,CACAC,SAAS,CAAE,QAAX,CAAAA,SAASA,CAAGC,KAAK,CAAK,CACpBX,KAAK,CAACU,SAAS,cAAfV,KAAK,CAACU,SAAS,CAAGC,KAAK,CAAC,CACxB,GAAI,CACF,GAAM,CAAAC,IAAI,CAAGC,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,WAAW,CAACH,IAAI,CAAC,CAC/C,GAAIA,IAAI,CAACI,IAAI,GAAK,SAAS,CAAE,CAC3Bd,cAAc,cAAdA,cAAc,CAAGU,IAAI,CAACA,IAAI,CAAC,CAC7B,CACF,CAAE,MAAOjC,CAAC,CAAE,CAAC,CACf,CAAE,CACFsC,KAAK,CAAE,CAAC,CAAEC,OAAO,CAAE,IAAK,CAAC,CAAElB,KAAK,CAACiB,KAAK,CAAE,CACxCE,OAAO,CAAE,KAAM,CACfC,8BAA8B,CAAE,KAAM,CACtCC,4BAA4B,CAAE,KAAM,EACrC,CAAC,CAEN,CACF,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAvC,OAAA,CAEac,cAAc","ignoreList":[]}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=openChatbot.js.mape",{value:true});exports.openChatbot=void 0;var _reactNative=require("react-native");var _constants=require("./constants");var openChatbot=exports.openChatbot=function openChatbot(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));var url=`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;_reactNative.Linking.openURL(url);};
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.openChatbot=void 0;var _reactNative=require("react-native");var _constants=require("./constants");var openChatbot=exports.openChatbot=function openChatbot(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));var url=`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;_reactNative.Linking.openURL(url);};
|
|
3
2
|
//# sourceMappingURL=openChatbot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["openChatbot.
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_constants","openChatbot","exports","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","Object","assign","id","url","BASE_CHATBOT_URL","toString","Linking","openURL"],"sourceRoot":"../../src","sources":["openChatbot.ts"],"mappings":"oFAAA,IAAAA,YAAA,CAAAC,OAAA,iBACA,IAAAC,UAAA,CAAAD,OAAA,gBAEO,GAAM,CAAAE,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,QAAd,CAAAA,WAAWA,CACtBE,SAAiB,CAER,IADT,CAAAC,gBAAwC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAE7C,GAAM,CAAAG,MAAM,CAAG,GAAI,CAAAC,eAAe,CAAAC,MAAA,CAAAC,MAAA,EAAGC,EAAE,CAAET,SAAS,EAAKC,gBAAgB,CAAE,CAAC,CAC1E,GAAM,CAAAS,GAAG,CAAG,GAAGC,2BAAgB,IAAIN,MAAM,CAACO,QAAQ,CAAC,CAAC,EAAE,CACtDC,oBAAO,CAACC,OAAO,CAACJ,GAAG,CAAC,CACtB,CAAC","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.21';
|
|
2
2
|
//# sourceMappingURL=version.staging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chatbotsdk.d.ts","sourceRoot":"","sources":["../../src/Chatbotsdk.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAoB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chatbotsdk.d.ts","sourceRoot":"","sources":["../../src/Chatbotsdk.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAoB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAqBvE,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;IACF,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,UAAU,oBAAqB,SAAQ,YAAY;IACjD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAcD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsmB3C,CAAC;AAmCF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { WebView, WebViewProps } from "react-native-webview";
|
|
3
|
+
interface ChatbotWebViewProps extends WebViewProps {
|
|
4
|
+
onDebugMessage?: (message: string) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ChatbotWebView: React.ForwardRefExoticComponent<ChatbotWebViewProps & React.RefAttributes<WebView<{}>>>;
|
|
7
|
+
export default ChatbotWebView;
|
|
8
|
+
//# sourceMappingURL=ChatbotWebView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatbotWebView.d.ts","sourceRoot":"","sources":["../../../src/components/ChatbotWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE7D,UAAU,mBAAoB,SAAQ,YAAY;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,QAAA,MAAM,cAAc,yFAuEnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.19-staging.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.19-staging.21";
|
|
2
2
|
//# sourceMappingURL=version.staging.d.ts.map
|
package/package.json
CHANGED
package/src/Chatbotsdk.tsx
CHANGED
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
getStorageScript,
|
|
40
40
|
createStorageMessage,
|
|
41
41
|
} from "./utils/webViewStorage";
|
|
42
|
+
import ChatbotWebView from "./components/ChatbotWebView";
|
|
42
43
|
|
|
43
44
|
export interface ChatbotProps {
|
|
44
45
|
api_key: string;
|
|
@@ -489,6 +490,13 @@ const Chatbot: React.FC<InternalChatbotProps> = ({
|
|
|
489
490
|
// }
|
|
490
491
|
// }, []);
|
|
491
492
|
|
|
493
|
+
// Add userAgent configuration
|
|
494
|
+
const userAgent = Platform.select({
|
|
495
|
+
android:
|
|
496
|
+
"Mozilla/5.0 (Linux; Android 10; Android SDK built for x86) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36",
|
|
497
|
+
ios: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
|
|
498
|
+
});
|
|
499
|
+
|
|
492
500
|
return (
|
|
493
501
|
<ErrorBoundary componentName="ChatbotSDK">
|
|
494
502
|
<View style={styles.mainContainer}>
|
|
@@ -519,11 +527,13 @@ const Chatbot: React.FC<InternalChatbotProps> = ({
|
|
|
519
527
|
style={[styles.fullScreenContainer, { opacity: fadeAnim }]}
|
|
520
528
|
> */}
|
|
521
529
|
<ErrorBoundary componentName="ChatbotWebView">
|
|
522
|
-
<
|
|
523
|
-
nestedScrollEnabled={true}
|
|
530
|
+
<ChatbotWebView
|
|
524
531
|
ref={webViewRef}
|
|
525
532
|
source={{ uri: constructUrl() }}
|
|
526
533
|
onMessage={handleMessage}
|
|
534
|
+
onDebugMessage={(message) => {
|
|
535
|
+
console.log("WebView Debug:", message);
|
|
536
|
+
}}
|
|
527
537
|
style={styles.webview}
|
|
528
538
|
// containerStyle={
|
|
529
539
|
// isFullScreen
|
|
@@ -616,6 +626,24 @@ const Chatbot: React.FC<InternalChatbotProps> = ({
|
|
|
616
626
|
}
|
|
617
627
|
}
|
|
618
628
|
|
|
629
|
+
// Add touch event handlers
|
|
630
|
+
document.addEventListener('touchstart', function(e) {
|
|
631
|
+
e.stopPropagation();
|
|
632
|
+
}, true);
|
|
633
|
+
|
|
634
|
+
// Improve click handling
|
|
635
|
+
document.addEventListener('click', function(e) {
|
|
636
|
+
const clickedElement = e.target;
|
|
637
|
+
console.log('Clicked element:', clickedElement);
|
|
638
|
+
|
|
639
|
+
// Log the event for debugging
|
|
640
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
641
|
+
type: 'CONSOLE',
|
|
642
|
+
level: 'debug',
|
|
643
|
+
data: 'Click event fired on: ' + clickedElement.className
|
|
644
|
+
}));
|
|
645
|
+
}, true);
|
|
646
|
+
|
|
619
647
|
true;
|
|
620
648
|
`);
|
|
621
649
|
isFirstLoadRef.current = false;
|
|
@@ -634,6 +662,22 @@ const Chatbot: React.FC<InternalChatbotProps> = ({
|
|
|
634
662
|
}
|
|
635
663
|
);
|
|
636
664
|
}}
|
|
665
|
+
userAgent={userAgent}
|
|
666
|
+
originWhitelist={["*"]}
|
|
667
|
+
mixedContentMode="always"
|
|
668
|
+
onContentProcessDidTerminate={() => {
|
|
669
|
+
webViewRef.current?.reload();
|
|
670
|
+
}}
|
|
671
|
+
injectedJavaScriptBeforeContentLoaded={`
|
|
672
|
+
window.onerror = function(message, source, lineno, colno, error) {
|
|
673
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
674
|
+
type: 'ERROR',
|
|
675
|
+
data: {message, source, lineno, colno}
|
|
676
|
+
}));
|
|
677
|
+
return true;
|
|
678
|
+
};
|
|
679
|
+
true;
|
|
680
|
+
`}
|
|
637
681
|
/>
|
|
638
682
|
</ErrorBoundary>
|
|
639
683
|
{/* </Animated.View> */}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { Platform } from "react-native";
|
|
3
|
+
import { WebView, WebViewProps } from "react-native-webview";
|
|
4
|
+
|
|
5
|
+
interface ChatbotWebViewProps extends WebViewProps {
|
|
6
|
+
onDebugMessage?: (message: string) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ChatbotWebView = forwardRef<WebView, ChatbotWebViewProps>(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const { onDebugMessage, ...restProps } = props;
|
|
12
|
+
|
|
13
|
+
const defaultInjectedJavaScript = `
|
|
14
|
+
// Override default touch handling
|
|
15
|
+
document.addEventListener('touchstart', function(e) {
|
|
16
|
+
const target = e.target;
|
|
17
|
+
if (target.tagName === 'BUTTON' || target.closest('button')) {
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
}
|
|
20
|
+
}, true);
|
|
21
|
+
|
|
22
|
+
// Add click debugging
|
|
23
|
+
document.addEventListener('click', function(e) {
|
|
24
|
+
const target = e.target;
|
|
25
|
+
console.log('Click detected on:', target.tagName, target.className);
|
|
26
|
+
|
|
27
|
+
// Force pointer events
|
|
28
|
+
const elements = document.querySelectorAll('*');
|
|
29
|
+
elements.forEach(el => {
|
|
30
|
+
const style = window.getComputedStyle(el);
|
|
31
|
+
if (style.pointerEvents === 'none') {
|
|
32
|
+
el.style.pointerEvents = 'auto';
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, true);
|
|
36
|
+
|
|
37
|
+
// Ensure buttons are clickable
|
|
38
|
+
const makeClickable = () => {
|
|
39
|
+
const buttons = document.querySelectorAll('button');
|
|
40
|
+
buttons.forEach(button => {
|
|
41
|
+
button.style.cursor = 'pointer';
|
|
42
|
+
button.style.pointerEvents = 'auto';
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Run initially and observe DOM changes
|
|
47
|
+
makeClickable();
|
|
48
|
+
new MutationObserver(makeClickable).observe(document.body, {
|
|
49
|
+
childList: true,
|
|
50
|
+
subtree: true
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
true;
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<WebView
|
|
58
|
+
ref={ref}
|
|
59
|
+
{...restProps}
|
|
60
|
+
injectedJavaScript={`
|
|
61
|
+
${defaultInjectedJavaScript}
|
|
62
|
+
${props.injectedJavaScript || ""}
|
|
63
|
+
`}
|
|
64
|
+
onMessage={(event) => {
|
|
65
|
+
props.onMessage?.(event);
|
|
66
|
+
try {
|
|
67
|
+
const data = JSON.parse(event.nativeEvent.data);
|
|
68
|
+
if (data.type === "CONSOLE") {
|
|
69
|
+
onDebugMessage?.(data.data);
|
|
70
|
+
}
|
|
71
|
+
} catch (e) {}
|
|
72
|
+
}}
|
|
73
|
+
style={[{ opacity: 0.99 }, props.style]} // Force new layer
|
|
74
|
+
bounces={false}
|
|
75
|
+
showsHorizontalScrollIndicator={false}
|
|
76
|
+
showsVerticalScrollIndicator={false}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
export default ChatbotWebView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated. Do not modify it manually.
|
|
2
|
-
export const SDK_VERSION = '2.0.19-staging.
|
|
2
|
+
export const SDK_VERSION = '2.0.19-staging.21';
|