@robylon/react-native-sdk 2.0.29-staging.8 → 2.0.31-staging.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Chatbotsdk.js +4 -3
- package/lib/commonjs/Chatbotsdk.js.map +1 -1
- package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js +1 -1
- package/lib/commonjs/FloatingButton/launchers/ImageLauncher.js.map +1 -1
- package/lib/commonjs/FloatingButton/launchers/TextLauncher.js +1 -1
- package/lib/commonjs/FloatingButton/launchers/TextLauncher.js.map +1 -1
- package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js +1 -1
- package/lib/commonjs/FloatingButton/launchers/TextualImageLauncher.js.map +1 -1
- package/lib/commonjs/FloatingButton.js +1 -1
- package/lib/commonjs/FloatingButton.js.map +1 -1
- package/lib/commonjs/LoadingIndicator.js +1 -1
- package/lib/commonjs/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/Toast.js +1 -1
- package/lib/commonjs/Toast.js.map +1 -1
- package/lib/commonjs/components/DebugButton.js +1 -1
- package/lib/commonjs/components/DebugButton.js.map +1 -1
- package/lib/commonjs/types/events.js +1 -1
- package/lib/commonjs/types/events.js.map +1 -1
- package/lib/commonjs/utils/fileDownload.js +1 -1
- package/lib/commonjs/utils/fileDownload.js.map +1 -1
- package/lib/commonjs/versions/version.staging.js +1 -1
- package/lib/module/Chatbotsdk.js +4 -3
- package/lib/module/Chatbotsdk.js.map +1 -1
- package/lib/module/FloatingButton/launchers/ImageLauncher.js +1 -1
- package/lib/module/FloatingButton/launchers/ImageLauncher.js.map +1 -1
- package/lib/module/FloatingButton/launchers/TextLauncher.js +1 -1
- package/lib/module/FloatingButton/launchers/TextLauncher.js.map +1 -1
- package/lib/module/FloatingButton/launchers/TextualImageLauncher.js +1 -1
- package/lib/module/FloatingButton/launchers/TextualImageLauncher.js.map +1 -1
- package/lib/module/FloatingButton.js +1 -1
- package/lib/module/FloatingButton.js.map +1 -1
- package/lib/module/LoadingIndicator.js +1 -1
- package/lib/module/LoadingIndicator.js.map +1 -1
- package/lib/module/Toast.js +1 -1
- package/lib/module/Toast.js.map +1 -1
- package/lib/module/components/DebugButton.js +1 -1
- package/lib/module/components/DebugButton.js.map +1 -1
- package/lib/module/openChatbot.js +2 -1
- package/lib/module/openChatbot.js.map +1 -1
- package/lib/module/types/events.js +1 -1
- package/lib/module/types/events.js.map +1 -1
- package/lib/module/utils/fileDownload.js +1 -1
- package/lib/module/utils/fileDownload.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/types/events.d.ts +4 -1
- package/lib/typescript/types/events.d.ts.map +1 -1
- package/lib/typescript/utils/fileDownload.d.ts +3 -2
- package/lib/typescript/utils/fileDownload.d.ts.map +1 -1
- package/lib/typescript/versions/version.staging.d.ts +1 -1
- package/package.json +6 -3
- package/src/Chatbotsdk.tsx +33 -14
- package/src/types/events.ts +3 -0
- package/src/utils/fileDownload.ts +116 -14
- package/src/versions/version.staging.ts +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.WidgetPositionEnums=exports.LauncherType=exports.ChatbotInterfaceType=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 _reactNativeWebview=require("react-native-webview");var _FloatingButton=_interopRequireDefault(require("./FloatingButton"));var _constants=require("./constants");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 _animations=require("./utils/animations");var _fileDownload=require("./utils/fileDownload");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.WidgetPositionEnums=exports.LauncherType=exports.ChatbotInterfaceType=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 _reactNativeWebview=require("react-native-webview");var _FloatingButton=_interopRequireDefault(require("./FloatingButton"));var _constants=require("./constants");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 _animations=require("./utils/animations");var _fileDownload=require("./utils/fileDownload");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/Chatbotsdk.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var ChatbotInterfaceType=exports.ChatbotInterfaceType=function(ChatbotInterfaceType){ChatbotInterfaceType["WIDGET"]="WIDGET";ChatbotInterfaceType["POPOVER"]="POPOVER";ChatbotInterfaceType["EMBED"]="EMBED";return ChatbotInterfaceType;}({});var WidgetPositionEnums=exports.WidgetPositionEnums=function(WidgetPositionEnums){WidgetPositionEnums["RIGHT"]="Right";WidgetPositionEnums["LEFT"]="Left";return WidgetPositionEnums;}({});var LauncherType=exports.LauncherType=function(LauncherType){LauncherType["TEXT"]="TEXT";LauncherType["IMAGE"]="IMAGE";LauncherType["TEXTUAL_IMAGE"]="TEXTUAL_IMAGE";return LauncherType;}({});var Chatbot=(0,_react.forwardRef)(function(_ref,ref){var _chatbotConfig$interf,_chatbotConfig$interf2,_chatbotConfig$interf3,_chatbotConfig$interf4,_chatbotConfig$interf5;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,externalOnOpen=_ref.onOpen,externalOnClose=_ref.onClose,onReady=_ref.onReady,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 _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),isInitialized=_useState8[0],setIsInitialized=_useState8[1];var webViewRef=(0,_react.useRef)(null);var isFirstLoadRef=(0,_react.useRef)(true);var _useState9=(0,_react.useState)(false),_useState10=(0,_slicedToArray2.default)(_useState9,2),toastVisible=_useState10[0],setToastVisible=_useState10[1];var _useState11=(0,_react.useState)(""),_useState12=(0,_slicedToArray2.default)(_useState11,2),toastMessage=_useState12[0],setToastMessage=_useState12[1];var _useState13=(0,_react.useState)(),_useState14=(0,_slicedToArray2.default)(_useState13,2),effectiveUserId=_useState14[0],setEffectiveUserId=_useState14[1];var _useState15=(0,_react.useState)(false),_useState16=(0,_slicedToArray2.default)(_useState15,2),isStorageReady=_useState16[0],setIsStorageReady=_useState16[1];var pendingStorageOps=(0,_react.useRef)([]);var memoryCache=(0,_react.useRef)({});var _useState17=(0,_react.useState)({os:"",browser:""}),_useState18=(0,_slicedToArray2.default)(_useState17,2),systemInfo=_useState18[0],setSystemInfo=_useState18[1];var systemInfoRef=(0,_react.useRef)({os:"",browser:""});var animatedValues=(0,_react.useRef)({scale:new _reactNative.Animated.Value(1),translateY:new _reactNative.Animated.Value(0),opacity:new _reactNative.Animated.Value(1)}).current;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;(0,_react.useImperativeHandle)(ref,function(){return{open:function open(){if(isInitialized){openWebView();}},close:function close(){if(isInitialized){closeWebView();}},toggle:function toggle(){if(isInitialized){if(isWebViewVisible){closeWebView();}else{openWebView();}}},isReady:function isReady(){return isInitialized;}};},[isInitialized,isWebViewVisible]);var triggerAppInit=function triggerAppInit(){if(webViewRef.current){var _webViewRef$current;(_webViewRef$current=webViewRef.current)==null?void 0:_webViewRef$current.injectJavaScript((0,_systemInfo.getBrowserAndOSInfoScript)());webViewRef.current.injectJavaScript(`
|
|
2
2
|
// Trigger APP_READY equivalent
|
|
3
3
|
window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'APP_READY' }));
|
|
4
4
|
true;
|
|
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$current2;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$current2=webViewRef.current)==null?void 0:_webViewRef$current2.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:""});systemInfoRef.current=parsedData==null?void 0:parsedData.data;return;}if((parsedData==null?void 0:parsedData.type)==="APP_READY"){emitEvent(_events.ChatbotEventType.CHATBOT_APP_READY);if(webViewRef.current&&isWebViewVisible){var _webViewRef$current3,_webViewRef$current4;(_webViewRef$current3=webViewRef.current)==null?void 0:_webViewRef$current3.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)(systemInfoRef==null?void 0:systemInfoRef.current),{__INT_SYS_INFO__:Object.assign({},(0,_systemInfo.getSystemInfo)(systemInfoRef==null?void 0:systemInfoRef.current))})}};_logger.logger.debug("messageData====>",JSON.stringify(messageData));(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript(`
|
|
5
|
+
`);}};var executeStorageOp=(0,_react.useCallback)(function(operation){if(isStorageReady){operation();}else{pendingStorageOps.current.push(operation);}},[isStorageReady]);var handleMessage=(0,_react.useCallback)(function(){var _ref2=(0,_asyncToGenerator2.default)(function*(event){var _webViewRef$current2;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$current2=webViewRef.current)==null?void 0:_webViewRef$current2.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:""});systemInfoRef.current=parsedData==null?void 0:parsedData.data;return;}if((parsedData==null?void 0:parsedData.type)==="APP_READY"){emitEvent(_events.ChatbotEventType.CHATBOT_APP_READY);if(webViewRef.current&&isWebViewVisible){var _webViewRef$current3,_webViewRef$current4;(_webViewRef$current3=webViewRef.current)==null?void 0:_webViewRef$current3.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)(systemInfoRef==null?void 0:systemInfoRef.current),{__INT_SYS_INFO__:Object.assign({},(0,_systemInfo.getSystemInfo)(systemInfoRef==null?void 0:systemInfoRef.current))})}};_logger.logger.debug("messageData====>",JSON.stringify(messageData));(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.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"download_file":if(parsedData!=null&&parsedData.data||parsedData!=null&&parsedData.url&&parsedData!=null&&parsedData.filename){var downloadData=(parsedData==null?void 0:parsedData.data)||{url:parsedData==null?void 0:parsedData.url,filename:parsedData==null?void 0:parsedData.filename};(0,_fileDownload.handleDownloadRequest)(downloadData);}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$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.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$current6;(_webViewRef$current6=webViewRef.current)==null?void 0:_webViewRef$current6.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$brand_config,_orgInfo$brand_config2,_orgInfo$brand_config3,_orgInfo$brand_config4,_orgInfo$brand_config5,_orgInfo$brand_config6,_orgInfo$brand_config7,_orgInfo$brand_config8,_orgInfo$brand_config9,_orgInfo$brand_config10,_orgInfo$brand_config11,_orgInfo$brand_config12,_orgInfo$brand_config13,_orgInfo$brand_config14,_orgInfo$brand_config15,_orgInfo$brand_config16,_orgInfo$brand_config17,_orgInfo$brand_config18,_orgInfo$brand_config19,_orgInfo$brand_config20,_orgInfo$brand_config21,_orgInfo$brand_config22;var config={brand_colour:((_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config2=_orgInfo$brand_config.colors)==null?void 0:_orgInfo$brand_config2.brand_color)||"",image_url:((_orgInfo$brand_config3=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config3.launcher_logo_url)||"",chat_interface_config:{chat_bubble_prompts:[],display_name:((_orgInfo$brand_config4=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config4.display_name)||"",welcome_message:((_orgInfo$brand_config5=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config5.welcome_message)||"Hey! What can we help you with today?",redirect_url:((_orgInfo$brand_config6=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config6.redirect_url)||""},interface_properties:{position:((_orgInfo$brand_config7=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config8=_orgInfo$brand_config7.interface_properties)==null?void 0:_orgInfo$brand_config8.position)||WidgetPositionEnums.RIGHT,side_spacing:(_orgInfo$brand_config9=(_orgInfo$brand_config10=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config11=_orgInfo$brand_config10.interface_properties)==null?void 0:_orgInfo$brand_config11.side_spacing)!=null?_orgInfo$brand_config9:20,bottom_spacing:(_orgInfo$brand_config12=(_orgInfo$brand_config13=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config14=_orgInfo$brand_config13.interface_properties)==null?void 0:_orgInfo$brand_config14.bottom_spacing)!=null?_orgInfo$brand_config12:20},interface_type:((_orgInfo$brand_config15=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config15.interface_type)||ChatbotInterfaceType.WIDGET,launcher_type:((_orgInfo$brand_config16=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config16.launcher_type)||LauncherType.IMAGE,launcher_properties:{text:((_orgInfo$brand_config17=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config18=_orgInfo$brand_config17.launcher_properties)==null?void 0:_orgInfo$brand_config18.text)||""},images:{launcher_image_url:{url:((_orgInfo$brand_config19=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config20=_orgInfo$brand_config19.images)==null?void 0:(_orgInfo$brand_config21=_orgInfo$brand_config20.launcher_image_url)==null?void 0:_orgInfo$brand_config21.url)||_constants.DEFAULT_LAUNCHER_IMAGE}},chat_iframe_url:((_orgInfo$brand_config22=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config22.chat_iframe_url)||""};setChatbotConfig(config);}}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});return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){(0,_animations.animateWebViewOpen)(animatedValues,function(){externalOnOpen==null?void 0:externalOnOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{requestAnimationFrame(function(){externalOnOpen==null?void 0:externalOnOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,animatedValues,externalOnOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}if(enableAnimation){(0,_animations.animateWebViewClose)(animatedValues,function(){setIsWebViewVisible(false);externalOnClose==null?void 0:externalOnClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);});}else{setIsWebViewVisible(false);externalOnClose==null?void 0:externalOnClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);}},[enableAnimation,animatedValues,externalOnClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);(0,_react.useEffect)(function(){if(!loading&&chatbotConfig&&effectiveUserId&&!isInitialized){setIsInitialized(true);onReady==null?void 0:onReady();}},[loading,chatbotConfig,effectiveUserId,isInitialized,onReady]);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 requestAndroidMicPermission=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){_reactNative.Alert.alert("Microphone permission","This app uses your microphone for voice features in the chatbot.");try{var alreadyGranted=yield _reactNative.PermissionsAndroid.check(_reactNative.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO);if(alreadyGranted){return true;}var result=yield _reactNative.PermissionsAndroid.request(_reactNative.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone permission",message:"This app uses your microphone for voice features in the chatbot.",buttonPositive:"Allow",buttonNegative:"Deny"});var granted=result===_reactNative.PermissionsAndroid.RESULTS.GRANTED;if(!granted){_reactNative.Alert.alert("Microphone required","Voice features will not work unless you allow microphone access.");}return granted;}catch(err){console.warn("Error requesting mic permission",err);return false;}}),[]);(0,_react.useEffect)(function(){requestAndroidMicPermission();},[requestAndroidMicPermission]);var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);var position=(chatbotConfig==null?void 0:(_chatbotConfig$interf=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf.position)||"Right";var sideSpacing=(_chatbotConfig$interf2=chatbotConfig==null?void 0:(_chatbotConfig$interf3=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf3.side_spacing)!=null?_chatbotConfig$interf2:20;var bottomSpacing=(_chatbotConfig$interf4=chatbotConfig==null?void 0:(_chatbotConfig$interf5=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf5.bottom_spacing)!=null?_chatbotConfig$interf4:20;return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles==null?void 0: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,{chatbotConfig:chatbotConfig,isWebViewVisible:isWebViewVisible,onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_colour,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.webViewWrapper,{height:isWebViewVisible?"100%":0}],pointerEvents:isWebViewVisible?"auto":"none",children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.fullScreenContainer,{opacity:animatedValues.opacity,transform:[{scale:animatedValues.scale},{translateY:animatedValues.translateY}]}],children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{webviewDebuggingEnabled:true,ref:webViewRef,source:{uri:constructUrl()},onMessage:handleMessage,style:styles.webview,containerStyle:isFullScreen?{width:screenDimensions.width,height:screenDimensions.height-40}:undefined,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)||request.url.startsWith((chatbotConfig==null?void 0:chatbotConfig.chat_iframe_url)||"");},startInLoadingState:isFirstLoadRef.current,onLoadEnd:function onLoadEnd(){var _webViewRef$current7;if(__DEV__){(0,_debugConfig.enableWebViewDebug)(webViewRef);}(_webViewRef$current7=webViewRef.current)==null?void 0:_webViewRef$current7.injectJavaScript(`
|
|
8
|
+
`);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"download_file":if(parsedData!=null&&parsedData.data||parsedData!=null&&parsedData.url&&parsedData!=null&&parsedData.filename){var downloadData=(parsedData==null?void 0:parsedData.data)||{url:parsedData==null?void 0:parsedData.url,filename:parsedData==null?void 0:parsedData.filename,inPlace:parsedData==null?void 0:parsedData.inPlace};(0,_fileDownload.handleDownloadRequest)(downloadData);}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;case"REQUEST_MIC_PERMISSION":var granted=yield requestAndroidMicPermission();if(webViewRef.current&&isWebViewVisible){var _webViewRef$current5;var _messageData={name:"requestMicPermission",action:"requestMicPermission",type:granted?"MIC_PERMISSION_GRANTED":"MIC_PERMISSION_DENIED"};_logger.logger.debug("messageData====>",JSON.stringify(_messageData));(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript(`
|
|
9
|
+
window.postMessage(${JSON.stringify(_messageData)}, '*');`);}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}});}});return function(_x){return _ref2.apply(this,arguments);};}(),[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref3=(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$current6;(_webViewRef$current6=webViewRef.current)==null?void 0:_webViewRef$current6.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref3.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current7;(_webViewRef$current7=webViewRef.current)==null?void 0:_webViewRef$current7.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref4=(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$brand_config,_orgInfo$brand_config2,_orgInfo$brand_config3,_orgInfo$brand_config4,_orgInfo$brand_config5,_orgInfo$brand_config6,_orgInfo$brand_config7,_orgInfo$brand_config8,_orgInfo$brand_config9,_orgInfo$brand_config10,_orgInfo$brand_config11,_orgInfo$brand_config12,_orgInfo$brand_config13,_orgInfo$brand_config14,_orgInfo$brand_config15,_orgInfo$brand_config16,_orgInfo$brand_config17,_orgInfo$brand_config18,_orgInfo$brand_config19,_orgInfo$brand_config20,_orgInfo$brand_config21,_orgInfo$brand_config22;var config={brand_colour:((_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config2=_orgInfo$brand_config.colors)==null?void 0:_orgInfo$brand_config2.brand_color)||"",image_url:((_orgInfo$brand_config3=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config3.launcher_logo_url)||"",chat_interface_config:{chat_bubble_prompts:[],display_name:((_orgInfo$brand_config4=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config4.display_name)||"",welcome_message:((_orgInfo$brand_config5=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config5.welcome_message)||"Hey! What can we help you with today?",redirect_url:((_orgInfo$brand_config6=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config6.redirect_url)||""},interface_properties:{position:((_orgInfo$brand_config7=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config8=_orgInfo$brand_config7.interface_properties)==null?void 0:_orgInfo$brand_config8.position)||WidgetPositionEnums.RIGHT,side_spacing:(_orgInfo$brand_config9=(_orgInfo$brand_config10=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config11=_orgInfo$brand_config10.interface_properties)==null?void 0:_orgInfo$brand_config11.side_spacing)!=null?_orgInfo$brand_config9:20,bottom_spacing:(_orgInfo$brand_config12=(_orgInfo$brand_config13=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config14=_orgInfo$brand_config13.interface_properties)==null?void 0:_orgInfo$brand_config14.bottom_spacing)!=null?_orgInfo$brand_config12:20},interface_type:((_orgInfo$brand_config15=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config15.interface_type)||ChatbotInterfaceType.WIDGET,launcher_type:((_orgInfo$brand_config16=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config16.launcher_type)||LauncherType.IMAGE,launcher_properties:{text:((_orgInfo$brand_config17=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config18=_orgInfo$brand_config17.launcher_properties)==null?void 0:_orgInfo$brand_config18.text)||""},images:{launcher_image_url:{url:((_orgInfo$brand_config19=orgInfo.brand_config)==null?void 0:(_orgInfo$brand_config20=_orgInfo$brand_config19.images)==null?void 0:(_orgInfo$brand_config21=_orgInfo$brand_config20.launcher_image_url)==null?void 0:_orgInfo$brand_config21.url)||_constants.DEFAULT_LAUNCHER_IMAGE}},chat_iframe_url:((_orgInfo$brand_config22=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config22.chat_iframe_url)||""};setChatbotConfig(config);}}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 _ref4.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});return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){(0,_animations.animateWebViewOpen)(animatedValues,function(){externalOnOpen==null?void 0:externalOnOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{requestAnimationFrame(function(){externalOnOpen==null?void 0:externalOnOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,animatedValues,externalOnOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}if(enableAnimation){(0,_animations.animateWebViewClose)(animatedValues,function(){setIsWebViewVisible(false);externalOnClose==null?void 0:externalOnClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);});}else{setIsWebViewVisible(false);externalOnClose==null?void 0:externalOnClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);}},[enableAnimation,animatedValues,externalOnClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);(0,_react.useEffect)(function(){if(!loading&&chatbotConfig&&effectiveUserId&&!isInitialized){setIsInitialized(true);onReady==null?void 0:onReady();}},[loading,chatbotConfig,effectiveUserId,isInitialized,onReady]);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 requestAndroidMicPermission=(0,_react.useCallback)((0,_asyncToGenerator2.default)(function*(){try{if(_reactNative.Platform.OS==="ios"){return true;}var alreadyGranted=yield _reactNative.PermissionsAndroid.check(_reactNative.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO);if(alreadyGranted){return true;}var result=yield _reactNative.PermissionsAndroid.request(_reactNative.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone permission",message:"This app uses your microphone for voice features.",buttonPositive:"Allow",buttonNegative:"Deny"});var granted=result===_reactNative.PermissionsAndroid.RESULTS.GRANTED;if(!granted){_reactNative.Alert.alert("Microphone required","Voice features will not work unless you allow microphone access.");}return granted;}catch(err){console.warn("Error requesting mic permission",err);return false;}}),[]);var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);var position=(chatbotConfig==null?void 0:(_chatbotConfig$interf=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf.position)||"Right";var sideSpacing=(_chatbotConfig$interf2=chatbotConfig==null?void 0:(_chatbotConfig$interf3=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf3.side_spacing)!=null?_chatbotConfig$interf2:20;var bottomSpacing=(_chatbotConfig$interf4=chatbotConfig==null?void 0:(_chatbotConfig$interf5=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf5.bottom_spacing)!=null?_chatbotConfig$interf4:20;return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles==null?void 0: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,{chatbotConfig:chatbotConfig,isWebViewVisible:isWebViewVisible,onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_colour,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.webViewWrapper,{height:isWebViewVisible?"100%":0}],pointerEvents:isWebViewVisible?"auto":"none",children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.fullScreenContainer,{opacity:animatedValues.opacity,transform:[{scale:animatedValues.scale},{translateY:animatedValues.translateY}]}],children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{mediaCapturePermissionGrantType:"grant",webviewDebuggingEnabled:true,ref:webViewRef,source:{uri:constructUrl()},onMessage:handleMessage,style:styles.webview,containerStyle:isFullScreen?{width:screenDimensions.width,height:screenDimensions.height-40}:undefined,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)||request.url.startsWith((chatbotConfig==null?void 0:chatbotConfig.chat_iframe_url)||"");},startInLoadingState:isFirstLoadRef.current,onLoadEnd:function onLoadEnd(){var _webViewRef$current8;if(__DEV__){(0,_debugConfig.enableWebViewDebug)(webViewRef);}(_webViewRef$current8=webViewRef.current)==null?void 0:_webViewRef$current8.injectJavaScript(`
|
|
9
10
|
if (!document.querySelector('meta[name="viewport"]')) {
|
|
10
11
|
var meta = document.createElement('meta');
|
|
11
12
|
meta.name = 'viewport';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_animations","_fileDownload","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChatbotInterfaceType","exports","WidgetPositionEnums","LauncherType","Chatbot","forwardRef","_ref","ref","_chatbotConfig$interf","_chatbotConfig$interf2","_chatbotConfig$interf3","_chatbotConfig$interf4","_chatbotConfig$interf5","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","externalOnOpen","onOpen","externalOnClose","onClose","onReady","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","_useState7","_useState8","isInitialized","setIsInitialized","webViewRef","useRef","isFirstLoadRef","_useState9","_useState10","toastVisible","setToastVisible","_useState11","_useState12","toastMessage","setToastMessage","_useState13","_useState14","effectiveUserId","setEffectiveUserId","_useState15","_useState16","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState17","os","browser","_useState18","systemInfo","setSystemInfo","systemInfoRef","animatedValues","scale","Animated","Value","translateY","opacity","current","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","useImperativeHandle","open","openWebView","close","closeWebView","toggle","isReady","triggerAppInit","_webViewRef$current","injectJavaScript","getBrowserAndOSInfoScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current2","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$current3","_webViewRef$current4","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","__INT_SYS_INFO__","debug","stringify","domain","url","filename","downloadData","handleDownloadRequest","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current5","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current6","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$brand_config","_orgInfo$brand_config2","_orgInfo$brand_config3","_orgInfo$brand_config4","_orgInfo$brand_config5","_orgInfo$brand_config6","_orgInfo$brand_config7","_orgInfo$brand_config8","_orgInfo$brand_config9","_orgInfo$brand_config10","_orgInfo$brand_config11","_orgInfo$brand_config12","_orgInfo$brand_config13","_orgInfo$brand_config14","_orgInfo$brand_config15","_orgInfo$brand_config16","_orgInfo$brand_config17","_orgInfo$brand_config18","_orgInfo$brand_config19","_orgInfo$brand_config20","_orgInfo$brand_config21","_orgInfo$brand_config22","config","brand_colour","brand_config","colors","brand_color","image_url","launcher_logo_url","chat_interface_config","chat_bubble_prompts","display_name","welcome_message","redirect_url","interface_properties","position","RIGHT","side_spacing","bottom_spacing","interface_type","WIDGET","launcher_type","IMAGE","launcher_properties","text","images","launcher_image_url","DEFAULT_LAUNCHER_IMAGE","chat_iframe_url","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","toString","animateWebViewOpen","CHATBOT_OPENED","setTimeout","requestAnimationFrame","postMessage","animateWebViewClose","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","requestAndroidMicPermission","Alert","alert","alreadyGranted","PermissionsAndroid","check","PERMISSIONS","RECORD_AUDIO","result","request","title","message","buttonPositive","buttonNegative","granted","RESULTS","GRANTED","err","warn","screenDimensions","enableNetworkDebug","sideSpacing","bottomSpacing","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","webViewWrapper","pointerEvents","fullScreenContainer","transform","WebView","webviewDebuggingEnabled","source","uri","webview","containerStyle","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current7","enableWebViewDebug","onError","syntheticEvent","description","code","displayName","StyleSheet","create","flex","overflow","top","left","right","bottom","zIndex","backgroundColor","inlineContainer","_default"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"+aAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WASA,IAAAC,YAAA,CAAAD,OAAA,iBAYA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,eAAA,CAAAC,sBAAA,CAAAJ,OAAA,sBACA,IAAAK,UAAA,CAAAL,OAAA,gBACA,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,CAAAP,sBAAA,CAAAJ,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,WAAA,CAAAjB,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Q,CAAE,SAEZ,CAAC,CACDO,eAAe,CAAE,CACfR,IAAI,CAAE,CAAC,CACPO,eAAe,CAAE,OACnB,CAAC,CACD/B,OAAO,CAAE,CACPwB,IAAI,CAAE,CAAC,CACPO,eAAe,CAAE,OAAO,CACxBD,MAAM,CAAE,KACV,CACF,CAAC,CAAC,CAAC,IAAAG,QAAA,CAAA5V,OAAA,CAAAX,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_animations","_fileDownload","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ChatbotInterfaceType","exports","WidgetPositionEnums","LauncherType","Chatbot","forwardRef","_ref","ref","_chatbotConfig$interf","_chatbotConfig$interf2","_chatbotConfig$interf3","_chatbotConfig$interf4","_chatbotConfig$interf5","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","externalOnOpen","onOpen","externalOnClose","onClose","onReady","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","_useState7","_useState8","isInitialized","setIsInitialized","webViewRef","useRef","isFirstLoadRef","_useState9","_useState10","toastVisible","setToastVisible","_useState11","_useState12","toastMessage","setToastMessage","_useState13","_useState14","effectiveUserId","setEffectiveUserId","_useState15","_useState16","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState17","os","browser","_useState18","systemInfo","setSystemInfo","systemInfoRef","animatedValues","scale","Animated","Value","translateY","opacity","current","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","useImperativeHandle","open","openWebView","close","closeWebView","toggle","isReady","triggerAppInit","_webViewRef$current","injectJavaScript","getBrowserAndOSInfoScript","executeStorageOp","useCallback","operation","push","handleMessage","_ref2","_asyncToGenerator2","event","_webViewRef$current2","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$current3","_webViewRef$current4","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","__INT_SYS_INFO__","debug","stringify","domain","url","filename","downloadData","inPlace","handleDownloadRequest","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","granted","requestAndroidMicPermission","_webViewRef$current5","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","_x","apply","arguments","useEffect","initializeUserId","_ref3","String","generateUUID","_webViewRef$current6","SET_STORAGE","getStorageScript","_webViewRef$current7","fetchChatbotConfig","_ref4","_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$brand_config","_orgInfo$brand_config2","_orgInfo$brand_config3","_orgInfo$brand_config4","_orgInfo$brand_config5","_orgInfo$brand_config6","_orgInfo$brand_config7","_orgInfo$brand_config8","_orgInfo$brand_config9","_orgInfo$brand_config10","_orgInfo$brand_config11","_orgInfo$brand_config12","_orgInfo$brand_config13","_orgInfo$brand_config14","_orgInfo$brand_config15","_orgInfo$brand_config16","_orgInfo$brand_config17","_orgInfo$brand_config18","_orgInfo$brand_config19","_orgInfo$brand_config20","_orgInfo$brand_config21","_orgInfo$brand_config22","config","brand_colour","brand_config","colors","brand_color","image_url","launcher_logo_url","chat_interface_config","chat_bubble_prompts","display_name","welcome_message","redirect_url","interface_properties","position","RIGHT","side_spacing","bottom_spacing","interface_type","WIDGET","launcher_type","IMAGE","launcher_properties","text","images","launcher_image_url","DEFAULT_LAUNCHER_IMAGE","chat_iframe_url","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","toString","animateWebViewOpen","CHATBOT_OPENED","setTimeout","requestAnimationFrame","postMessage","animateWebViewClose","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","alreadyGranted","PermissionsAndroid","check","PERMISSIONS","RECORD_AUDIO","result","request","title","message","buttonPositive","buttonNegative","RESULTS","GRANTED","Alert","alert","err","warn","screenDimensions","enableNetworkDebug","sideSpacing","bottomSpacing","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","webViewWrapper","pointerEvents","fullScreenContainer","transform","WebView","mediaCapturePermissionGrantType","webviewDebuggingEnabled","source","uri","webview","containerStyle","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current8","enableWebViewDebug","onError","syntheticEvent","description","code","displayName","StyleSheet","create","flex","overflow","top","left","right","bottom","zIndex","backgroundColor","inlineContainer","_default"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"+aAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WASA,IAAAC,YAAA,CAAAD,OAAA,iBAYA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,eAAA,CAAAC,sBAAA,CAAAJ,OAAA,sBACA,IAAAK,UAAA,CAAAL,OAAA,gBACA,IAAAM,WAAA,CAAAN,OAAA,uB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AAA,CAAAjW,OAAA,CAAAX,OAAA,CAEYc,OAAO","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _ErrorTrackingService=require("../../services/ErrorTrackingService");var _errorConstants=require("../../constants/errorConstants");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _ErrorTrackingService=require("../../services/ErrorTrackingService");var _errorConstants=require("../../constants/errorConstants");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/FloatingButton/launchers/ImageLauncher.tsx";var ImageLauncher=function ImageLauncher(_ref){var _chatbotConfig$images3,_chatbotConfig$images4;var chatbotConfig=_ref.chatbotConfig,onPress=_ref.onPress,isWebViewVisible=_ref.isWebViewVisible;var handleImageError=function handleImageError(){var _chatbotConfig$images,_chatbotConfig$images2;_ErrorTrackingService.errorTracker.trackError(new Error("Failed to load launcher image"),"ImageLauncher",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{imageUrl:chatbotConfig==null?void 0:(_chatbotConfig$images=chatbotConfig.images)==null?void 0:(_chatbotConfig$images2=_chatbotConfig$images.launcher_image_url)==null?void 0:_chatbotConfig$images2.url}});};return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,{backgroundColor:isWebViewVisible?"transparent":chatbotConfig.brand_colour},isWebViewVisible&&styles.disabledButton],onPress:isWebViewVisible?undefined:onPress,activeOpacity:isWebViewVisible?1:0.7,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:chatbotConfig==null?void 0:(_chatbotConfig$images3=chatbotConfig.images)==null?void 0:(_chatbotConfig$images4=_chatbotConfig$images3.launcher_image_url)==null?void 0:_chatbotConfig$images4.url},style:styles.buttonImage,onError:handleImageError})});};var styles=_reactNative.StyleSheet.create({button:{borderRadius:24,width:48,height:48,justifyContent:"center",alignItems:"center",elevation:5,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:0.25,shadowRadius:3.84},buttonImage:{width:48,height:48,borderRadius:24},disabledButton:{backgroundColor:"rgba(0, 0, 0, 0)"}});var _default=exports.default=ImageLauncher;
|
|
2
2
|
//# sourceMappingURL=ImageLauncher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_jsxRuntime","_this","_jsxFileName","ImageLauncher","_ref","_chatbotConfig$images3","_chatbotConfig$images4","chatbotConfig","onPress","isWebViewVisible","handleImageError","_chatbotConfig$images","_chatbotConfig$images2","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","imageUrl","images","launcher_image_url","url","jsx","TouchableOpacity","style","styles","button","backgroundColor","brand_colour","disabledButton","undefined","activeOpacity","children","Image","source","uri","buttonImage","onError","StyleSheet","create","borderRadius","width","height","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","_default","exports","default"],"sourceRoot":"../../../../src","sources":["FloatingButton/launchers/ImageLauncher.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,qBAAA,CAAAF,OAAA,wCACA,IAAAG,eAAA,CAAAH,OAAA,mCAA4D,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_jsxRuntime","_this","_jsxFileName","ImageLauncher","_ref","_chatbotConfig$images3","_chatbotConfig$images4","chatbotConfig","onPress","isWebViewVisible","handleImageError","_chatbotConfig$images","_chatbotConfig$images2","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","imageUrl","images","launcher_image_url","url","jsx","TouchableOpacity","style","styles","button","backgroundColor","brand_colour","disabledButton","undefined","activeOpacity","children","Image","source","uri","buttonImage","onError","StyleSheet","create","borderRadius","width","height","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","_default","exports","default"],"sourceRoot":"../../../../src","sources":["FloatingButton/launchers/ImageLauncher.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,qBAAA,CAAAF,OAAA,wCACA,IAAAG,eAAA,CAAAH,OAAA,mCAA4D,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,kIAQ5D,GAAM,CAAAC,aAA2C,CAAG,QAA9C,CAAAA,aAA2CA,CAAAC,IAAA,CAI3C,KAAAC,sBAAA,CAAAC,sBAAA,IAHJ,CAAAC,aAAa,CAAAH,IAAA,CAAbG,aAAa,CACbC,OAAO,CAAAJ,IAAA,CAAPI,OAAO,CACPC,gBAAgB,CAAAL,IAAA,CAAhBK,gBAAgB,CAEhB,GAAM,CAAAC,gBAAgB,CAAG,QAAnB,CAAAA,gBAAgBA,CAAA,CAAS,KAAAC,qBAAA,CAAAC,sBAAA,CAC7BC,kCAAY,CAACC,UAAU,CACrB,GAAI,CAAAC,KAAK,CAAC,+BAA+B,CAAC,CAC1C,eAAe,CACf,CACEC,IAAI,CAAEC,0BAAU,CAACC,aAAa,CAC9BC,OAAO,CAAE,CAAEC,QAAQ,CAAEb,aAAa,eAAAI,qBAAA,CAAbJ,aAAa,CAAEc,MAAM,gBAAAT,sBAAA,CAArBD,qBAAA,CAAuBW,kBAAkB,eAAzCV,sBAA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AAC,CACDX,cAAc,CAAE,CACdF,eAAe,CAAE,kBACnB,CACF,CAAC,CAAC,CAAC,IAAAuB,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEYnD,aAAa","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _colorUtils=require("../../utils/colorUtils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _colorUtils=require("../../utils/colorUtils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/FloatingButton/launchers/TextLauncher.tsx";var TextLauncher=function TextLauncher(_ref){var _chatbotConfig$launch;var chatbotConfig=_ref.chatbotConfig,onPress=_ref.onPress,isWebViewVisible=_ref.isWebViewVisible;console.log("TEXT_LAUNCHER",{brand_colour:chatbotConfig==null?void 0:chatbotConfig.brand_colour,isWebViewVisible:isWebViewVisible});var containerStyle=Object.assign({},styles.container,{backgroundColor:isWebViewVisible?"transparent":(chatbotConfig==null?void 0:chatbotConfig.brand_colour)||"#007AFF"});var buttonTextStyle=Object.assign({},styles.buttonText,{color:(0,_colorUtils.getBestFontColor)((chatbotConfig==null?void 0:chatbotConfig.brand_colour)||"#ffffff")});return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[containerStyle,isWebViewVisible&&styles.disabledButton],children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button],onPress:isWebViewVisible?undefined:onPress,activeOpacity:isWebViewVisible?1:0.7,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.textContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:buttonTextStyle,numberOfLines:1,children:(chatbotConfig==null?void 0:(_chatbotConfig$launch=chatbotConfig.launcher_properties)==null?void 0:_chatbotConfig$launch.text)||"Chat"})})})});};var styles=_reactNative.StyleSheet.create({container:{maxWidth:160,minWidth:120,height:40,borderRadius:9999,shadowColor:"#000",shadowOffset:{width:0,height:0},shadowOpacity:0.24,shadowRadius:16,elevation:5},button:{flex:1,paddingHorizontal:20,paddingVertical:9,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,minWidth:0},buttonText:{fontSize:14,fontWeight:"600",textAlign:"center"},disabledButton:{backgroundColor:"rgba(0, 0, 0, 0)"}});var _default=exports.default=TextLauncher;
|
|
2
2
|
//# sourceMappingURL=TextLauncher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_colorUtils","_jsxRuntime","_this","_jsxFileName","TextLauncher","_ref","_chatbotConfig$launch","chatbotConfig","onPress","isWebViewVisible","console","log","brand_colour","containerStyle","Object","assign","styles","container","backgroundColor","buttonTextStyle","buttonText","color","getBestFontColor","jsx","View","style","disabledButton","children","TouchableOpacity","button","undefined","activeOpacity","textContainer","Text","numberOfLines","launcher_properties","text","StyleSheet","create","maxWidth","minWidth","height","borderRadius","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","elevation","flex","paddingHorizontal","paddingVertical","justifyContent","alignItems","fontSize","fontWeight","textAlign","_default","exports","default"],"sourceRoot":"../../../../src","sources":["FloatingButton/launchers/TextLauncher.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,WAAA,CAAAF,OAAA,2BAA0D,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_colorUtils","_jsxRuntime","_this","_jsxFileName","TextLauncher","_ref","_chatbotConfig$launch","chatbotConfig","onPress","isWebViewVisible","console","log","brand_colour","containerStyle","Object","assign","styles","container","backgroundColor","buttonTextStyle","buttonText","color","getBestFontColor","jsx","View","style","disabledButton","children","TouchableOpacity","button","undefined","activeOpacity","textContainer","Text","numberOfLines","launcher_properties","text","StyleSheet","create","maxWidth","minWidth","height","borderRadius","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","elevation","flex","paddingHorizontal","paddingVertical","justifyContent","alignItems","fontSize","fontWeight","textAlign","_default","exports","default"],"sourceRoot":"../../../../src","sources":["FloatingButton/launchers/TextLauncher.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,WAAA,CAAAF,OAAA,2BAA0D,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,iIAQ1D,GAAM,CAAAC,YAAyC,CAAG,QAA5C,CAAAA,YAAyCA,CAAAC,IAAA,CAIzC,KAAAC,qBAAA,IAHJ,CAAAC,aAAa,CAAAF,IAAA,CAAbE,aAAa,CACbC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,gBAAgB,CAAAJ,IAAA,CAAhBI,gBAAgB,CAEhBC,OAAO,CAACC,GAAG,CAAC,eAAe,CAAE,CAC3BC,YAAY,CAAEL,aAAa,cAAbA,aAAa,CAAEK,YAAY,CACzCH,gBAAgB,CAAhBA,gBACF,CAAC,CAAC,CAEF,GAAM,CAAAI,cAAc,CAAAC,MAAA,CAAAC,MAAA,IACfC,MAAM,CAACC,SAAS,EACnBC,eAAe,CAAET,gBAAgB,CAC7B,aAAa,CACb,CAAAF,aAAa,cAAbA,aAAa,CAAEK,YAAY,GAAI,SAAS,EAC7C,CAED,GAAM,CAAAO,eAAe,CAAAL,MAAA,CAAAC,MAAA,IAChBC,MAAM,CAACI,UAAU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Y,CAAE,EAAE,CAChBC,SAAS,CAAE,CACb,CAAC,CACDnB,MAAM,CAAE,CACNoB,IAAI,CAAE,CAAC,CACPC,iBAAiB,CAAE,EAAE,CACrBC,eAAe,CAAE,CAAC,CAClBC,cAAc,CAAE,QAAQ,CACxBC,UAAU,CAAE,QACd,CAAC,CACDrB,aAAa,CAAE,CACbiB,IAAI,CAAE,CAAC,CACPT,QAAQ,CAAE,CACZ,CAAC,CACDpB,UAAU,CAAE,CACVkC,QAAQ,CAAE,EAAE,CACZC,UAAU,CAAE,KAAK,CACjBC,SAAS,CAAE,QACb,CAAC,CACD9B,cAAc,CAAE,CACdR,eAAe,CAAE,kBACnB,CACF,CAAC,CAAC,CAAC,IAAAuC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEYvD,YAAY","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _ErrorTrackingService=require("../../services/ErrorTrackingService");var _errorConstants=require("../../constants/errorConstants");var _colorUtils=require("../../utils/colorUtils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _ErrorTrackingService=require("../../services/ErrorTrackingService");var _errorConstants=require("../../constants/errorConstants");var _colorUtils=require("../../utils/colorUtils");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/FloatingButton/launchers/TextualImageLauncher.tsx";var TextualImageLauncher=function TextualImageLauncher(_ref){var _chatbotConfig$launch,_chatbotConfig$launch2,_chatbotConfig$launch3,_chatbotConfig$images3,_chatbotConfig$images4;var chatbotConfig=_ref.chatbotConfig,onPress=_ref.onPress,isWebViewVisible=_ref.isWebViewVisible;console.log("TEXTUALIMAGE_LAUNCHER_DEBUG",{brand_colour:chatbotConfig==null?void 0:chatbotConfig.brand_colour,text:chatbotConfig==null?void 0:(_chatbotConfig$launch=chatbotConfig.launcher_properties)==null?void 0:_chatbotConfig$launch.text,isWebViewVisible:isWebViewVisible});var containerStyle=Object.assign({},styles.container,{backgroundColor:isWebViewVisible?"transparent":(chatbotConfig==null?void 0:chatbotConfig.brand_colour)||"#007AFF"});var handleImageError=function handleImageError(){var _chatbotConfig$images,_chatbotConfig$images2;_ErrorTrackingService.errorTracker.trackError(new Error("Failed to load launcher image"),"TextualImageLauncher",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{imageUrl:chatbotConfig==null?void 0:(_chatbotConfig$images=chatbotConfig.images)==null?void 0:(_chatbotConfig$images2=_chatbotConfig$images.launcher_image_url)==null?void 0:_chatbotConfig$images2.url}});};var buttonTextStyle=Object.assign({},styles.buttonText,{color:(0,_colorUtils.getBestFontColor)((chatbotConfig==null?void 0:chatbotConfig.brand_colour)||"#ffffff")});console.log("TEXTUALIMAGE_LAUNCHER_TEXT_STYLE",{brand_colour:chatbotConfig==null?void 0:chatbotConfig.brand_colour,text_color:buttonTextStyle.color,text:chatbotConfig==null?void 0:(_chatbotConfig$launch2=chatbotConfig.launcher_properties)==null?void 0:_chatbotConfig$launch2.text});return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[containerStyle,isWebViewVisible&&styles.disabledButton],children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.button,onPress:isWebViewVisible?undefined:onPress,activeOpacity:isWebViewVisible?1:0.7,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.contentContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.textContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:buttonTextStyle,numberOfLines:1,ellipsizeMode:"tail",children:(chatbotConfig==null?void 0:(_chatbotConfig$launch3=chatbotConfig.launcher_properties)==null?void 0:_chatbotConfig$launch3.text)||"Chat"})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.imageContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:chatbotConfig==null?void 0:(_chatbotConfig$images3=chatbotConfig.images)==null?void 0:(_chatbotConfig$images4=_chatbotConfig$images3.launcher_image_url)==null?void 0:_chatbotConfig$images4.url},style:styles.buttonImage,onError:handleImageError})})]})})});};var styles=_reactNative.StyleSheet.create({container:{minWidth:140,maxWidth:208,height:40,borderRadius:9999,shadowColor:"#000",shadowOffset:{width:0,height:0},shadowOpacity:0.24,shadowRadius:16,elevation:5},button:{flex:1,height:"100%"},contentContainer:{flex:1,flexDirection:"row",alignItems:"center",paddingLeft:20,height:"100%"},textContainer:{flexShrink:1,flexGrow:0,marginRight:8},buttonText:{fontSize:14,fontWeight:"600"},imageContainer:{width:40,height:40,borderRadius:9999,overflow:"hidden"},buttonImage:{width:"100%",height:"100%",resizeMode:"cover"},disabledButton:{backgroundColor:"rgba(0, 0, 0, 0)"}});var _default=exports.default=TextualImageLauncher;
|
|
2
2
|
//# sourceMappingURL=TextualImageLauncher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_colorUtils","_jsxRuntime","_this","_jsxFileName","TextualImageLauncher","_ref","_chatbotConfig$launch","_chatbotConfig$launch2","_chatbotConfig$launch3","_chatbotConfig$images3","_chatbotConfig$images4","chatbotConfig","onPress","isWebViewVisible","console","log","brand_colour","text","launcher_properties","containerStyle","Object","assign","styles","container","backgroundColor","handleImageError","_chatbotConfig$images","_chatbotConfig$images2","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","imageUrl","images","launcher_image_url","url","buttonTextStyle","buttonText","color","getBestFontColor","text_color","jsx","View","style","disabledButton","children","TouchableOpacity","button","undefined","activeOpacity","jsxs","contentContainer","textContainer","Text","numberOfLines","ellipsizeMode","imageContainer","Image","source","uri","buttonImage","onError","StyleSheet","create","minWidth","maxWidth","height","borderRadius","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","elevation","flex","flexDirection","alignItems","paddingLeft","flexShrink","flexGrow","marginRight","fontSize","fontWeight","overflow","resizeMode","_default","exports","default"],"sourceRoot":"../../../../src","sources":["FloatingButton/launchers/TextualImageLauncher.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAEA,IAAAE,qBAAA,CAAAF,OAAA,wCACA,IAAAG,eAAA,CAAAH,OAAA,mCACA,IAAAI,WAAA,CAAAJ,OAAA,2BAA0D,IAAAK,WAAA,CAAAL,OAAA,0BAAAM,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_colorUtils","_jsxRuntime","_this","_jsxFileName","TextualImageLauncher","_ref","_chatbotConfig$launch","_chatbotConfig$launch2","_chatbotConfig$launch3","_chatbotConfig$images3","_chatbotConfig$images4","chatbotConfig","onPress","isWebViewVisible","console","log","brand_colour","text","launcher_properties","containerStyle","Object","assign","styles","container","backgroundColor","handleImageError","_chatbotConfig$images","_chatbotConfig$images2","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","imageUrl","images","launcher_image_url","url","buttonTextStyle","buttonText","color","getBestFontColor","text_color","jsx","View","style","disabledButton","children","TouchableOpacity","button","undefined","activeOpacity","jsxs","contentContainer","textContainer","Text","numberOfLines","ellipsizeMode","imageContainer","Image","source","uri","buttonImage","onError","StyleSheet","create","minWidth","maxWidth","height","borderRadius","shadowColor","shadowOffset","width","shadowOpacity","shadowRadius","elevation","flex","flexDirection","alignItems","paddingLeft","flexShrink","flexGrow","marginRight","fontSize","fontWeight","overflow","resizeMode","_default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CAAE,CAAC,CACPR,MAAM,CAAE,MACV,CAAC,CACDf,gBAAgB,CAAE,CAChBuB,IAAI,CAAE,CAAC,CACPC,aAAa,CAAE,KAAK,CACpBC,UAAU,CAAE,QAAQ,CACpBC,WAAW,CAAE,EAAE,CACfX,MAAM,CAAE,MACV,CAAC,CACDd,aAAa,CAAE,CACb0B,UAAU,CAAE,CAAC,CACbC,QAAQ,CAAE,CAAC,CACXC,WAAW,CAAE,CACf,CAAC,CACD3C,UAAU,CAAE,CACV4C,QAAQ,CAAE,EAAE,CACZC,UAAU,CAAE,KACd,CAAC,CACD1B,cAAc,CAAE,CACdc,KAAK,CAAE,EAAE,CACTJ,MAAM,CAAE,EAAE,CACVC,YAAY,CAAE,IAAI,CAClBgB,QAAQ,CAAE,QACZ,CAAC,CACDvB,WAAW,CAAE,CACXU,KAAK,CAAE,MAAM,CACbJ,MAAM,CAAE,MAAM,CACdkB,UAAU,CAAE,OACd,CAAC,CACDxC,cAAc,CAAE,CACdvB,eAAe,CAAE,kBACnB,CACF,CAAC,CAAC,CAAC,IAAAgE,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEYtF,oBAAoB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Chatbotsdk=require("./Chatbotsdk");var _ImageLauncher=_interopRequireDefault(require("./FloatingButton/launchers/ImageLauncher"));var _TextLauncher=_interopRequireDefault(require("./FloatingButton/launchers/TextLauncher"));var _TextualImageLauncher=_interopRequireDefault(require("./FloatingButton/launchers/TextualImageLauncher"));var _animations=require("./utils/animations");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Chatbotsdk=require("./Chatbotsdk");var _ImageLauncher=_interopRequireDefault(require("./FloatingButton/launchers/ImageLauncher"));var _TextLauncher=_interopRequireDefault(require("./FloatingButton/launchers/TextLauncher"));var _TextualImageLauncher=_interopRequireDefault(require("./FloatingButton/launchers/TextualImageLauncher"));var _animations=require("./utils/animations");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/FloatingButton.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var FloatingButton=function FloatingButton(_ref){var _chatbotConfig$interf,_chatbotConfig$interf2,_chatbotConfig$interf3,_chatbotConfig$interf4,_chatbotConfig$interf5;var onPress=_ref.onPress,isWebViewVisible=_ref.isWebViewVisible,chatbotConfig=_ref.chatbotConfig;var buttonScale=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;(0,_react.useEffect)(function(){(0,_animations.animateButtonScale)(buttonScale,isWebViewVisible);},[isWebViewVisible,buttonScale]);console.log("FLOATING_BUTTON_CONFIG",{config:chatbotConfig,brand_colour:chatbotConfig==null?void 0:chatbotConfig.brand_colour,launcher_type:chatbotConfig==null?void 0:chatbotConfig.launcher_type});var position=(chatbotConfig==null?void 0:(_chatbotConfig$interf=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf.position)||"Right";var sideSpacing=(_chatbotConfig$interf2=chatbotConfig==null?void 0:(_chatbotConfig$interf3=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf3.side_spacing)!=null?_chatbotConfig$interf2:20;var bottomSpacing=(_chatbotConfig$interf4=chatbotConfig==null?void 0:(_chatbotConfig$interf5=chatbotConfig.interface_properties)==null?void 0:_chatbotConfig$interf5.bottom_spacing)!=null?_chatbotConfig$interf4:20;var buttonContainerStyle=(0,_react.useMemo)(function(){return Object.assign({},styles.container,(0,_defineProperty2.default)((0,_defineProperty2.default)((0,_defineProperty2.default)((0,_defineProperty2.default)({},position.toLowerCase(),sideSpacing!=null?sideSpacing:20),"alignItems",position==="Right"?"flex-end":"flex-start"),"bottom",bottomSpacing!=null?bottomSpacing:20),"transform",[{scale:buttonScale}]));},[position,sideSpacing,bottomSpacing,buttonScale]);var renderLauncher=function renderLauncher(){switch(chatbotConfig==null?void 0:chatbotConfig.launcher_type){case _Chatbotsdk.LauncherType.TEXT:return(0,_jsxRuntime.jsx)(_TextLauncher.default,{chatbotConfig:chatbotConfig,onPress:onPress,isWebViewVisible:isWebViewVisible});case _Chatbotsdk.LauncherType.TEXTUAL_IMAGE:return(0,_jsxRuntime.jsx)(_TextualImageLauncher.default,{chatbotConfig:chatbotConfig,onPress:onPress,isWebViewVisible:isWebViewVisible});case _Chatbotsdk.LauncherType.IMAGE:default:return(0,_jsxRuntime.jsx)(_ImageLauncher.default,{chatbotConfig:chatbotConfig,onPress:onPress,isWebViewVisible:isWebViewVisible});}};return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:buttonContainerStyle,pointerEvents:isWebViewVisible?"none":"auto",children:renderLauncher()});};var styles=_reactNative.StyleSheet.create({container:{position:"absolute",zIndex:998}});var _default=exports.default=FloatingButton;
|
|
2
2
|
//# sourceMappingURL=FloatingButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Chatbotsdk","_ImageLauncher","_interopRequireDefault","_TextLauncher","_TextualImageLauncher","_animations","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FloatingButton","_ref","_chatbotConfig$interf","_chatbotConfig$interf2","_chatbotConfig$interf3","_chatbotConfig$interf4","_chatbotConfig$interf5","onPress","isWebViewVisible","chatbotConfig","buttonScale","useRef","Animated","Value","current","useEffect","animateButtonScale","console","log","config","brand_colour","launcher_type","position","interface_properties","sideSpacing","side_spacing","bottomSpacing","bottom_spacing","buttonContainerStyle","useMemo","assign","styles","container","_defineProperty2","toLowerCase","scale","renderLauncher","LauncherType","TEXT","jsx","TEXTUAL_IMAGE","IMAGE","View","style","pointerEvents","children","StyleSheet","create","zIndex","_default","exports"],"sourceRoot":"../../src","sources":["FloatingButton.tsx"],"mappings":"iQAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,WAAA,CAAAF,OAAA,iBACA,IAAAG,cAAA,CAAAC,sBAAA,CAAAJ,OAAA,8CACA,IAAAK,aAAA,CAAAD,sBAAA,CAAAJ,OAAA,6CACA,IAAAM,qBAAA,CAAAF,sBAAA,CAAAJ,OAAA,qDACA,IAAAO,WAAA,CAAAP,OAAA,uBAAwD,IAAAQ,WAAA,CAAAR,OAAA,0BAAAS,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Chatbotsdk","_ImageLauncher","_interopRequireDefault","_TextLauncher","_TextualImageLauncher","_animations","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FloatingButton","_ref","_chatbotConfig$interf","_chatbotConfig$interf2","_chatbotConfig$interf3","_chatbotConfig$interf4","_chatbotConfig$interf5","onPress","isWebViewVisible","chatbotConfig","buttonScale","useRef","Animated","Value","current","useEffect","animateButtonScale","console","log","config","brand_colour","launcher_type","position","interface_properties","sideSpacing","side_spacing","bottomSpacing","bottom_spacing","buttonContainerStyle","useMemo","assign","styles","container","_defineProperty2","toLowerCase","scale","renderLauncher","LauncherType","TEXT","jsx","TEXTUAL_IMAGE","IMAGE","View","style","pointerEvents","children","StyleSheet","create","zIndex","_default","exports"],"sourceRoot":"../../src","sources":["FloatingButton.tsx"],"mappings":"iQAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,WAAA,CAAAF,OAAA,iBACA,IAAAG,cAAA,CAAAC,sBAAA,CAAAJ,OAAA,8CACA,IAAAK,aAAA,CAAAD,sBAAA,CAAAJ,OAAA,6CACA,IAAAM,qBAAA,CAAAF,sBAAA,CAAAJ,OAAA,qDACA,IAAAO,WAAA,CAAAP,OAAA,uBAAwD,IAAAQ,WAAA,CAAAR,OAAA,0BAAAS,KAAA,MAAAC,YAAA,mHAAAX,wBAAAY,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAd,uBAAA,UAAAA,wBAAAY,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,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OAAQ,CACjBC,gBAAgB,CAAEA,gBAAiB,CACpC,CAAC,CAEN,IAAK,CAAA6B,wBAAY,CAACG,aAAa,CAC7B,MACE,GAAA/D,WAAA,CAAA8D,GAAA,EAAChE,qBAAA,CAAAe,OAAoB,EACnBmB,aAAa,CAAEA,aAAc,CAC7BF,OAAO,CAAEA,OAAQ,CACjBC,gBAAgB,CAAEA,gBAAiB,CACpC,CAAC,CAEN,IAAK,CAAA6B,wBAAY,CAACI,KAAK,CACvB,QACE,MACE,GAAAhE,WAAA,CAAA8D,GAAA,EAACnE,cAAA,CAAAkB,OAAa,EACZmB,aAAa,CAAEA,aAAc,CAC7BF,OAAO,CAAEA,OAAQ,CACjBC,gBAAgB,CAAEA,gBAAiB,CACpC,CAAC,CAER,CACF,CAAC,CAED,MACE,GAAA/B,WAAA,CAAA8D,GAAA,EAACrE,YAAA,CAAA0C,QAAQ,CAAC8B,IAAI,EACZC,KAAK,CAAEf,oBAAqB,CAC5BgB,aAAa,CAAEpC,gBAAgB,CAAG,MAAM,CAAG,MAAO,CAAAqC,QAAA,CAEjDT,cAAc,CAAC,CAAC,CACJ,CAAC,CAEpB,CAAC,CAED,GAAM,CAAAL,MAAM,CAAGe,uBAAU,CAACC,MAAM,CAAC,CAC/Bf,SAAS,CAAE,CACTV,QAAQ,CAAE,UAAU,CACpB0B,MAAM,CAAE,GACV,CACF,CAAC,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAA5D,OAAA,CAEYU,cAAc","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/LoadingIndicator.tsx";var LoadingIndicator=function LoadingIndicator(){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flex:1,justifyContent:"center",alignItems:"center"},children:(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"large",color:"#0000ff"})});};var _default=exports.default=LoadingIndicator;
|
|
2
2
|
//# sourceMappingURL=LoadingIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_this","_jsxFileName","LoadingIndicator","jsx","View","style","flex","justifyContent","alignItems","children","ActivityIndicator","size","color","_default","exports","default"],"sourceRoot":"../../src","sources":["LoadingIndicator.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAAuD,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","_this","_jsxFileName","LoadingIndicator","jsx","View","style","flex","justifyContent","alignItems","children","ActivityIndicator","size","color","_default","exports","default"],"sourceRoot":"../../src","sources":["LoadingIndicator.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAAuD,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,KAAA,MAAAC,YAAA,4GAGvD,GAAM,CAAAC,gBAA0B,CAAG,QAA7B,CAAAA,gBAA0BA,CAAA,QAC9B,GAAAH,WAAA,CAAAI,GAAA,EAACL,YAAA,CAAAM,IAAI,EAACC,KAAK,CAAE,CAAEC,IAAI,CAAE,CAAC,CAAEC,cAAc,CAAE,QAAQ,CAAEC,UAAU,CAAE,QAAS,CAAE,CAAAC,QAAA,CACvE,GAAAV,WAAA,CAAAI,GAAA,EAACL,YAAA,CAAAY,iBAAiB,EAACC,IAAI,CAAC,OAAO,CAACC,KAAK,CAAC,SAAS,CAAE,CAAC,CAC9C,CAAC,EACR,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEab,gBAAgB","ignoreList":[]}
|
package/lib/commonjs/Toast.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/Toast.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var Toast=function Toast(_ref){var message=_ref.message,visible=_ref.visible,_ref$duration=_ref.duration,duration=_ref$duration===void 0?3000:_ref$duration;var _useState=(0,_react.useState)(new _reactNative.Animated.Value(0)),_useState2=(0,_slicedToArray2.default)(_useState,1),fadeAnim=_useState2[0];(0,_react.useEffect)(function(){if(visible){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:300,useNativeDriver:true}).start(function(){setTimeout(function(){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:300,useNativeDriver:true}).start();},duration);});}},[visible]);return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.toastContainer,{opacity:fadeAnim,display:visible?"flex":"none"}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.toastText,children:message})});};var styles=_reactNative.StyleSheet.create({toastContainer:{position:"absolute",bottom:50,left:"10%",right:"10%",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:10,borderRadius:5,alignItems:"center",justifyContent:"center"},toastText:{color:"#fff",textAlign:"center"}});var _default=exports.default=Toast;
|
|
2
2
|
//# sourceMappingURL=Toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Toast","_ref","message","visible","_ref$duration","duration","_useState","useState","Animated","Value","_useState2","_slicedToArray2","fadeAnim","useEffect","timing","toValue","useNativeDriver","start","setTimeout","jsx","View","style","styles","toastContainer","opacity","display","children","Text","toastText","StyleSheet","create","position","bottom","left","right","backgroundColor","padding","borderRadius","alignItems","justifyContent","color","textAlign","_default","exports"],"sourceRoot":"../../src","sources":["Toast.tsx"],"mappings":"+PAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAAgE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Toast","_ref","message","visible","_ref$duration","duration","_useState","useState","Animated","Value","_useState2","_slicedToArray2","fadeAnim","useEffect","timing","toValue","useNativeDriver","start","setTimeout","jsx","View","style","styles","toastContainer","opacity","display","children","Text","toastText","StyleSheet","create","position","bottom","left","right","backgroundColor","padding","borderRadius","alignItems","justifyContent","color","textAlign","_default","exports"],"sourceRoot":"../../src","sources":["Toast.tsx"],"mappings":"+PAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAAgE,IAAAE,WAAA,CAAAF,OAAA,0BAAAG,KAAA,MAAAC,YAAA,0GAAAL,wBAAAM,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAR,uBAAA,UAAAA,wBAAAM,CAAA,CAAAC,CAAA,MAAAA,CAAA,EAAAD,CAAA,EAAAA,CAAA,CAAAK,UAAA,QAAAL,CAAA,KAAAM,CAAA,CAAAC,CAAA,CAAAC,CAAA,EAAAC,SAAA,MAAAC,OAAA,CAAAV,CAAA,YAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAQ,CAAA,IAAAF,CAAA,CAAAL,CAAA,CAAAG,CAAA,CAAAD,CAAA,KAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,SAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,CAAAQ,CAAA,WAAAM,EAAA,IAAAd,CAAA,aAAAc,EAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,EAAA,KAAAP,CAAA,EAAAD,CAAA,CAAA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CAAA0C,GAAA,EAAC3C,YAAA,CAAAgC,QAAQ,CAACY,IAAI,EACZC,KAAK,CAAE,CACLC,MAAM,CAACC,cAAc,CACrB,CAAEC,OAAO,CAAEZ,QAAQ,CAAEa,OAAO,CAAEtB,OAAO,CAAG,MAAM,CAAG,MAAO,CAAC,CACzD,CAAAuB,QAAA,CAEF,GAAAjD,WAAA,CAAA0C,GAAA,EAAC3C,YAAA,CAAAmD,IAAI,EAACN,KAAK,CAAEC,MAAM,CAACM,SAAU,CAAAF,QAAA,CAAExB,OAAO,CAAO,CAAC,CAClC,CAAC,CAEpB,CAAC,CAED,GAAM,CAAAoB,MAAM,CAAGO,uBAAU,CAACC,MAAM,CAAC,CAC/BP,cAAc,CAAE,CACdQ,QAAQ,CAAE,UAAU,CACpBC,MAAM,CAAE,EAAE,CACVC,IAAI,CAAE,KAAK,CACXC,KAAK,CAAE,KAAK,CACZC,eAAe,CAAE,oBAAoB,CACrCC,OAAO,CAAE,EAAE,CACXC,YAAY,CAAE,CAAC,CACfC,UAAU,CAAE,QAAQ,CACpBC,cAAc,CAAE,QAClB,CAAC,CACDX,SAAS,CAAE,CACTY,KAAK,CAAE,MAAM,CACbC,SAAS,CAAE,QACb,CACF,CAAC,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAArD,OAAA,CAEYU,KAAK","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _debugMenu=require("../utils/debugMenu");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _debugMenu=require("../utils/debugMenu");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/professional/Mobile sdks/robylon-react-native-sdk/src/components/DebugButton.tsx";var DebugButton=function DebugButton(){if(!__DEV__)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.debugContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.debugButton,onPress:_debugMenu.openDebugMenu,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.debugText,children:"Menu"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.debugButton,styles.debuggerButton],onPress:_debugMenu.openDebuggerFromApp,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.debugText,children:"Debug"})})]});};var styles=_reactNative.StyleSheet.create({debugContainer:{position:"absolute",top:40,right:10,flexDirection:"row",gap:8},debugButton:{backgroundColor:"rgba(0,0,0,0.7)",padding:8,borderRadius:4},debuggerButton:{backgroundColor:"rgba(255,0,0,0.7)"},debugText:{color:"white",fontSize:12}});var _default=exports.default=DebugButton;
|
|
2
2
|
//# sourceMappingURL=DebugButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_debugMenu","_jsxRuntime","_this","_jsxFileName","DebugButton","__DEV__","jsxs","View","style","styles","debugContainer","children","jsx","TouchableOpacity","debugButton","onPress","openDebugMenu","Text","debugText","debuggerButton","openDebuggerFromApp","StyleSheet","create","position","top","right","flexDirection","gap","backgroundColor","padding","borderRadius","color","fontSize","_default","exports","default"],"sourceRoot":"../../../src","sources":["components/DebugButton.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,UAAA,CAAAF,OAAA,uBAAmD,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_debugMenu","_jsxRuntime","_this","_jsxFileName","DebugButton","__DEV__","jsxs","View","style","styles","debugContainer","children","jsx","TouchableOpacity","debugButton","onPress","openDebugMenu","Text","debugText","debuggerButton","openDebuggerFromApp","StyleSheet","create","position","top","right","flexDirection","gap","backgroundColor","padding","borderRadius","color","fontSize","_default","exports","default"],"sourceRoot":"../../../src","sources":["components/DebugButton.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,UAAA,CAAAF,OAAA,uBAAmD,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,KAAA,MAAAC,YAAA,kHAGnD,GAAM,CAAAC,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,GAAI,CAACC,OAAO,CAAE,MAAO,KAAI,CAEzB,MACE,GAAAJ,WAAA,CAAAK,IAAA,EAACP,YAAA,CAAAQ,IAAI,EAACC,KAAK,CAAEC,MAAM,CAACC,cAAe,CAAAC,QAAA,EACjC,GAAAV,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAc,gBAAgB,EAACL,KAAK,CAAEC,MAAM,CAACK,WAAY,CAACC,OAAO,CAAEC,wBAAc,CAAAL,QAAA,CAClE,GAAAV,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAkB,IAAI,EAACT,KAAK,CAAEC,MAAM,CAACS,SAAU,CAAAP,QAAA,CAAC,MAAI,CAAM,CAAC,CAC1B,CAAC,CACnB,GAAAV,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAc,gBAAgB,EACfL,KAAK,CAAE,CAACC,MAAM,CAACK,WAAW,CAAEL,MAAM,CAACU,cAAc,CAAE,CACnDJ,OAAO,CAAEK,8BAAoB,CAAAT,QAAA,CAE7B,GAAAV,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAkB,IAAI,EAACT,KAAK,CAAEC,MAAM,CAACS,SAAU,CAAAP,QAAA,CAAC,OAAK,CAAM,CAAC,CAC3B,CAAC,EACf,CAAC,CAEX,CAAC,CAED,GAAM,CAAAF,MAAM,CAAGY,uBAAU,CAACC,MAAM,CAAC,CAC/BZ,cAAc,CAAE,CACda,QAAQ,CAAE,UAAU,CACpBC,GAAG,CAAE,EAAE,CACPC,KAAK,CAAE,EAAE,CACTC,aAAa,CAAE,KAAK,CACpBC,GAAG,CAAE,CACP,CAAC,CACDb,WAAW,CAAE,CACXc,eAAe,CAAE,iBAAiB,CAClCC,OAAO,CAAE,CAAC,CACVC,YAAY,CAAE,CAChB,CAAC,CACDX,cAAc,CAAE,CACdS,eAAe,CAAE,mBACnB,CAAC,CACDV,SAAS,CAAE,CACTa,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,EACZ,CACF,CAAC,CAAC,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEY/B,WAAW","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.InternalEventType=exports.ChatbotEventType=void 0;var ChatbotEventType=exports.ChatbotEventType=function(ChatbotEventType){ChatbotEventType["CHATBOT_BUTTON_LOADED"]="CHATBOT_BUTTON_LOADED";ChatbotEventType["CHATBOT_BUTTON_CLICKED"]="CHATBOT_BUTTON_CLICKED";ChatbotEventType["CHATBOT_OPENED"]="CHATBOT_OPENED";ChatbotEventType["CHATBOT_CLOSED"]="CHATBOT_CLOSED";ChatbotEventType["CHATBOT_APP_READY"]="CHATBOT_APP_READY";ChatbotEventType["CHATBOT_LOADED"]="CHATBOT_LOADED";ChatbotEventType["CHAT_INITIALIZED"]="CHAT_INITIALIZED";ChatbotEventType["SESSION_REFRESHED"]="SESSION_REFRESHED";ChatbotEventType["CHAT_INITIALIZATION_FAILED"]="CHAT_INITIALIZATION_FAILED";return ChatbotEventType;}({});var InternalEventType=exports.InternalEventType=function(InternalEventType){InternalEventType["CHAT_MOVED"]="CHAT_MOVED";return InternalEventType;}({});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.InternalEventType=exports.ChatbotEventType=void 0;var ChatbotEventType=exports.ChatbotEventType=function(ChatbotEventType){ChatbotEventType["CHATBOT_BUTTON_LOADED"]="CHATBOT_BUTTON_LOADED";ChatbotEventType["CHATBOT_BUTTON_CLICKED"]="CHATBOT_BUTTON_CLICKED";ChatbotEventType["CHATBOT_OPENED"]="CHATBOT_OPENED";ChatbotEventType["CHATBOT_CLOSED"]="CHATBOT_CLOSED";ChatbotEventType["CHATBOT_APP_READY"]="CHATBOT_APP_READY";ChatbotEventType["CHATBOT_LOADED"]="CHATBOT_LOADED";ChatbotEventType["CHAT_INITIALIZED"]="CHAT_INITIALIZED";ChatbotEventType["SESSION_REFRESHED"]="SESSION_REFRESHED";ChatbotEventType["CHAT_INITIALIZATION_FAILED"]="CHAT_INITIALIZATION_FAILED";ChatbotEventType["REQUEST_MIC_PERMISSION"]="REQUEST_MIC_PERMISSION";ChatbotEventType["MIC_PERMISSION_GRANTED"]="MIC_PERMISSION_GRANTED";ChatbotEventType["MIC_PERMISSION_DENIED"]="MIC_PERMISSION_DENIED";return ChatbotEventType;}({});var InternalEventType=exports.InternalEventType=function(InternalEventType){InternalEventType["CHAT_MOVED"]="CHAT_MOVED";return InternalEventType;}({});
|
|
2
2
|
//# sourceMappingURL=events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ChatbotEventType","exports","InternalEventType"],"sourceRoot":"../../../src","sources":["types/events.ts"],"mappings":"sHAAY,CAAAA,gBAAgB,CAAAC,OAAA,CAAAD,gBAAA,UAAhBA,gBAAgB,EAAhBA,gBAAgB,kDAAhBA,gBAAgB,oDAAhBA,gBAAgB,oCAAhBA,gBAAgB,oCAAhBA,gBAAgB,0CAAhBA,gBAAgB,oCAAhBA,gBAAgB,wCAAhBA,gBAAgB,0CAAhBA,gBAAgB,
|
|
1
|
+
{"version":3,"names":["ChatbotEventType","exports","InternalEventType"],"sourceRoot":"../../../src","sources":["types/events.ts"],"mappings":"sHAAY,CAAAA,gBAAgB,CAAAC,OAAA,CAAAD,gBAAA,UAAhBA,gBAAgB,EAAhBA,gBAAgB,kDAAhBA,gBAAgB,oDAAhBA,gBAAgB,oCAAhBA,gBAAgB,oCAAhBA,gBAAgB,0CAAhBA,gBAAgB,oCAAhBA,gBAAgB,wCAAhBA,gBAAgB,0CAAhBA,gBAAgB,4DAAhBA,gBAAgB,oDAAhBA,gBAAgB,oDAAhBA,gBAAgB,wDAAhB,CAAAA,gBAAgB,UAehB,CAAAE,iBAAiB,CAAAD,OAAA,CAAAC,iBAAA,UAAjBA,iBAAiB,EAAjBA,iBAAiB,kCAAjB,CAAAA,iBAAiB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.handleDownloadRequest=exports.downloadFile=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _logger=require("./logger");var downloadFile=exports.downloadFile=function(){var
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.handleDownloadRequest=exports.downloadFile=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _reactNativeBlobUtil=_interopRequireDefault(require("react-native-blob-util"));var _logger=require("./logger");var normalizeUrl=function normalizeUrl(url){return url==null?void 0:url.trim();};var sanitizeFileName=function sanitizeFileName(filename){var fallbackName=`chat-transcript-${Date.now()}.pdf`;var trimmedName=filename==null?void 0:filename.trim();if(!trimmedName)return fallbackName;return trimmedName.replace(/[<>:"/\\|?*\x00-\x1F]/g,"_");};var isValidHttpUrl=function isValidHttpUrl(url){return /^https?:\/\//i.test(url);};var openUrlWithFallback=function(){var _ref=(0,_asyncToGenerator2.default)(function*(url){try{yield _reactNative.Linking.openURL(url);return;}catch(primaryError){_logger.logger.warn("Primary URL open failed, trying browser fallback",{url:url,primaryError:primaryError instanceof Error?primaryError==null?void 0:primaryError.message:String(primaryError)});}yield _reactNative.Linking.openURL(`https://docs.google.com/viewer?url=${encodeURIComponent(url)}`);});return function openUrlWithFallback(_x){return _ref.apply(this,arguments);};}();var downloadOnAndroid=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(url,filename){var fs=_reactNativeBlobUtil.default.fs,config=_reactNativeBlobUtil.default.config;var downloadPath=`${fs.dirs.DownloadDir}/${filename}`;yield config({fileCache:true,path:downloadPath,addAndroidDownloads:{useDownloadManager:true,notification:true,title:filename,description:"Downloading transcript",mime:"application/pdf",mediaScannable:true,path:downloadPath}}).fetch("GET",url);});return function downloadOnAndroid(_x2,_x3){return _ref2.apply(this,arguments);};}();var downloadOniOS=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(url,filename){var fs=_reactNativeBlobUtil.default.fs,config=_reactNativeBlobUtil.default.config;var iosPath=`${fs.dirs.DocumentDir}/${filename}`;yield config({fileCache:true,path:iosPath}).fetch("GET",url);yield _reactNative.Share.share({url:`file://${iosPath}`,message:filename,title:filename});});return function downloadOniOS(_x4,_x5){return _ref3.apply(this,arguments);};}();var downloadWithNativeStorage=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(url,filename){var safeName=sanitizeFileName(filename);if(_reactNative.Platform.OS==="android"){yield downloadOnAndroid(url,safeName);return;}yield downloadOniOS(url,safeName);});return function downloadWithNativeStorage(_x6,_x7){return _ref4.apply(this,arguments);};}();var shouldUseInPlaceDownload=function shouldUseInPlaceDownload(downloadRequest){return(downloadRequest==null?void 0:downloadRequest.inPlace)===true;};var downloadFile=exports.downloadFile=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(url,filename,inPlace){try{var normalizedUrl=normalizeUrl(url);_logger.logger.debug("Initiating file download",{url:normalizedUrl,filename:filename});if(!normalizedUrl||typeof normalizedUrl!=="string"){throw new Error("Invalid URL provided for download");}if(!isValidHttpUrl(normalizedUrl)){throw new Error("Download URL must be an http/https URL");}if(inPlace){try{yield downloadWithNativeStorage(normalizedUrl,filename);_logger.logger.debug("File downloaded with native storage flow");}catch(nativeDownloadError){_logger.logger.warn("Native download failed, falling back to URL open",{url:normalizedUrl,nativeDownloadError:nativeDownloadError instanceof Error?nativeDownloadError==null?void 0:nativeDownloadError.message:String(nativeDownloadError)});yield openUrlWithFallback(normalizedUrl);_logger.logger.debug("File download opened with fallback browser flow");}return;}yield openUrlWithFallback(normalizedUrl);_logger.logger.debug("File download opened with legacy URL flow");}catch(error){_logger.logger.error("File download failed",{url:url,filename:filename,error:error instanceof Error?error==null?void 0:error.message:String(error)});throw error;}});return function downloadFile(_x8,_x9,_x10){return _ref5.apply(this,arguments);};}();var handleDownloadRequest=exports.handleDownloadRequest=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(downloadRequest){var url=downloadRequest.url,filename=downloadRequest.filename;if(!url){_logger.logger.error("Download request missing URL");return;}try{yield downloadFile(url,filename,shouldUseInPlaceDownload(downloadRequest));}catch(error){_logger.logger.error("Failed to handle download request",{downloadRequest:downloadRequest,error:error});}});return function handleDownloadRequest(_x11){return _ref6.apply(this,arguments);};}();
|
|
2
2
|
//# sourceMappingURL=fileDownload.js.map
|