@robylon/react-native-sdk 2.0.19-staging.9 → 2.0.21-dev.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.
Files changed (91) hide show
  1. package/lib/commonjs/ChatbotWebview.js +1 -1
  2. package/lib/commonjs/ChatbotWebview.js.map +1 -1
  3. package/lib/commonjs/Chatbotsdk.js +69 -2
  4. package/lib/commonjs/Chatbotsdk.js.map +1 -1
  5. package/lib/commonjs/FloatingButton.js +1 -1
  6. package/lib/commonjs/FloatingButton.js.map +1 -1
  7. package/lib/commonjs/Toast.js +1 -1
  8. package/lib/commonjs/Toast.js.map +1 -1
  9. package/lib/commonjs/constants.js +1 -1
  10. package/lib/commonjs/constants.js.map +1 -1
  11. package/lib/commonjs/openChatbot.js +2 -1
  12. package/lib/commonjs/openChatbot.js.map +1 -1
  13. package/lib/commonjs/version.js +1 -1
  14. package/lib/commonjs/versions/version.dev.js +1 -1
  15. package/lib/commonjs/versions/version.dev.js.map +1 -1
  16. package/lib/commonjs/versions/version.staging.js +1 -1
  17. package/lib/commonjs/versions/version.staging.js.map +1 -1
  18. package/lib/module/ChatbotWebview.js +1 -1
  19. package/lib/module/ChatbotWebview.js.map +1 -1
  20. package/lib/module/Chatbotsdk.js +69 -2
  21. package/lib/module/Chatbotsdk.js.map +1 -1
  22. package/lib/module/FloatingButton.js +1 -1
  23. package/lib/module/FloatingButton.js.map +1 -1
  24. package/lib/module/Toast.js +1 -1
  25. package/lib/module/Toast.js.map +1 -1
  26. package/lib/module/constants.js +1 -1
  27. package/lib/module/constants.js.map +1 -1
  28. package/lib/module/version.js +1 -1
  29. package/lib/module/versions/version.dev.js +1 -1
  30. package/lib/module/versions/version.dev.js.map +1 -1
  31. package/lib/module/versions/version.staging.js +1 -1
  32. package/lib/module/versions/version.staging.js.map +1 -1
  33. package/lib/typescript/Chatbotsdk.d.ts +40 -0
  34. package/lib/typescript/Chatbotsdk.d.ts.map +1 -1
  35. package/lib/typescript/FloatingButton.d.ts +1 -0
  36. package/lib/typescript/FloatingButton.d.ts.map +1 -1
  37. package/lib/typescript/version.d.ts +1 -1
  38. package/lib/typescript/version.d.ts.map +1 -1
  39. package/lib/typescript/versions/version.dev.d.ts +1 -1
  40. package/lib/typescript/versions/version.dev.d.ts.map +1 -1
  41. package/lib/typescript/versions/version.staging.d.ts +1 -1
  42. package/lib/typescript/versions/version.staging.d.ts.map +1 -1
  43. package/package.json +2 -2
  44. package/usage/react-native-ios-docs.md +185 -0
  45. package/.npmignore.development +0 -18
  46. package/.npmignore.production +0 -8
  47. package/.npmignore.staging +0 -7
  48. package/babel.config.js +0 -17
  49. package/scripts/create-branch.js +0 -560
  50. package/scripts/create-version-tag.js +0 -29
  51. package/scripts/get-next-version.js +0 -29
  52. package/scripts/husky-setup.js +0 -32
  53. package/scripts/prevent-direct-branch.js +0 -37
  54. package/scripts/publish-version.js +0 -13
  55. package/scripts/release.js +0 -77
  56. package/scripts/setup-git-hooks.js +0 -18
  57. package/scripts/update-version.js +0 -28
  58. package/scripts/validate-branch-name.sh +0 -65
  59. package/scripts/validate-publish.js +0 -71
  60. package/src/ChatbotWebview.tsx +0 -44
  61. package/src/Chatbotsdk.tsx +0 -679
  62. package/src/FloatingButton.tsx +0 -74
  63. package/src/LoadingIndicator.tsx +0 -11
  64. package/src/Toast.tsx +0 -65
  65. package/src/components/DebugButton.tsx +0 -46
  66. package/src/components/ErrorBoundary.tsx +0 -38
  67. package/src/config.ts +0 -4
  68. package/src/constants/errorConstants.ts +0 -21
  69. package/src/constants.ts +0 -4
  70. package/src/global.d.ts +0 -11
  71. package/src/hooks/useChatbotEvents.ts +0 -93
  72. package/src/index.tsx +0 -10
  73. package/src/openChatbot.ts +0 -11
  74. package/src/openChatbot.tsx +0 -0
  75. package/src/services/ErrorTrackingService.ts +0 -217
  76. package/src/types/events.ts +0 -25
  77. package/src/types/react-native-flipper-performance-plugin.d.ts +0 -3
  78. package/src/types/react-native-globals.d.ts +0 -10
  79. package/src/utils/cookieUtils.ts +0 -7
  80. package/src/utils/debugConfig.ts +0 -56
  81. package/src/utils/debugMenu.ts +0 -14
  82. package/src/utils/errorHandler.ts +0 -58
  83. package/src/utils/logger.ts +0 -14
  84. package/src/utils/systemInfo.ts +0 -84
  85. package/src/utils/webViewStorage.ts +0 -62
  86. package/src/version.ts +0 -2
  87. package/src/versions/version.dev.ts +0 -2
  88. package/src/versions/version.production.ts +0 -2
  89. package/src/versions/version.staging.ts +0 -2
  90. package/tsconfig.build.json +0 -16
  91. package/tsconfig.json +0 -26
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ChatbotWebview=void 0;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 _constants=require("./constants");var _LoadingIndicator=_interopRequireDefault(require("./LoadingIndicator"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/ChatbotWebview.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var constructUrl=function constructUrl(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;};var ChatbotWebview=exports.ChatbotWebview=function ChatbotWebview(_ref){var chatbotId=_ref.chatbotId,additionalParams=_ref.additionalParams;var _useState=(0,_react.useState)(""),_useState2=(0,_slicedToArray2.default)(_useState,2),url=_useState2[0],setUrl=_useState2[1];(0,_react.useEffect)(function(){setUrl(constructUrl(chatbotId,additionalParams));},[chatbotId,additionalParams]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flex:1},children:url?(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{source:{uri:url},startInLoadingState:true,renderLoading:function renderLoading(){return(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{});}}):(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{})});};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ChatbotWebview=void 0;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 _constants=require("./constants");var _LoadingIndicator=_interopRequireDefault(require("./LoadingIndicator"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/ChatbotWebview.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 constructUrl=function constructUrl(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;};var ChatbotWebview=exports.ChatbotWebview=function ChatbotWebview(_ref){var chatbotId=_ref.chatbotId,additionalParams=_ref.additionalParams;var _useState=(0,_react.useState)(""),_useState2=(0,_slicedToArray2.default)(_useState,2),url=_useState2[0],setUrl=_useState2[1];(0,_react.useEffect)(function(){setUrl(constructUrl(chatbotId,additionalParams));},[chatbotId,additionalParams]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flex:1},children:url?(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{source:{uri:url},startInLoadingState:true,renderLoading:function renderLoading(){return(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{});}}):(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{})});};
2
2
  //# sourceMappingURL=ChatbotWebview.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_constants","_LoadingIndicator","_interopRequireDefault","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","constructUrl","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","assign","id","BASE_CHATBOT_URL","toString","ChatbotWebview","exports","_ref","_useState","useState","_useState2","_slicedToArray2","url","setUrl","useEffect","jsx","View","style","flex","children","WebView","source","uri","startInLoadingState","renderLoading"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":"sQACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,UAAA,CAAAH,OAAA,gBACA,IAAAI,iBAAA,CAAAC,sBAAA,CAAAL,OAAA,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3C,CAAC,CAEF,GAAAT,WAAA,CAAA6C,GAAA,EAAC/C,iBAAA,CAAAW,OAAgB,GAAE,CACpB,CACG,CAAC,CAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_constants","_LoadingIndicator","_interopRequireDefault","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","constructUrl","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","assign","id","BASE_CHATBOT_URL","toString","ChatbotWebview","exports","_ref","_useState","useState","_useState2","_slicedToArray2","url","setUrl","useEffect","jsx","View","style","flex","children","WebView","source","uri","startInLoadingState","renderLoading"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":"sQACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,UAAA,CAAAH,OAAA,gBACA,IAAAI,iBAAA,CAAAC,sBAAA,CAAAL,OAAA,wBAAkD,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,KAAA,MAAAC,YAAA,mGAAAT,wBAAAU,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAZ,uBAAA,UAAAA,wBAAAU,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,CA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AF,UAAA,IAAEG,MAAM,CAAAH,UAAA,IAElB,GAAAI,gBAAS,EAAC,UAAM,CACdD,MAAM,CAACpB,YAAY,CAACC,SAAS,CAAEC,gBAAgB,CAAC,CAAC,CACnD,CAAC,CAAE,CAACD,SAAS,CAAEC,gBAAgB,CAAC,CAAC,CAEjC,MACE,GAAAzB,WAAA,CAAA6C,GAAA,EAAClD,YAAA,CAAAmD,IAAI,EAACC,KAAK,CAAE,CAAEC,IAAI,CAAE,CAAE,CAAE,CAAAC,QAAA,CACtBP,GAAG,CACF,GAAA1C,WAAA,CAAA6C,GAAA,EAACjD,mBAAA,CAAAsD,OAAO,EACNC,MAAM,CAAE,CAAEC,GAAG,CAAEV,GAAI,CAAE,CACrBW,mBAAmB,CAAE,IAAK,CAC1BC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAA,QAAQ,GAAAtD,WAAA,CAAA6C,GAAA,EAAC/C,iBAAA,CAAAe,OAAgB,GAAE,CAAC,EAAC,CAC3C,CAAC,CAEF,GAAAb,WAAA,CAAA6C,GAAA,EAAC/C,iBAAA,CAAAe,OAAgB,GAAE,CACpB,CACG,CAAC,CAEX,CAAC","ignoreList":[]}
@@ -1,9 +1,76 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeWebview=require("react-native-webview");var _FloatingButton=_interopRequireDefault(require("./FloatingButton"));var _constants=require("./constants");var _version=require("./version");var _systemInfo=require("./utils/systemInfo");var _useChatbotEvents2=require("./hooks/useChatbotEvents");var _events=require("./types/events");var _logger=require("./utils/logger");var _debugConfig=require("./utils/debugConfig");var _DebugButton=_interopRequireDefault(require("./components/DebugButton"));var _ErrorBoundary=require("./components/ErrorBoundary");var _errorConstants=require("./constants/errorConstants");var _ErrorTrackingService=require("./services/ErrorTrackingService");var _cookieUtils=require("./utils/cookieUtils");var _webViewStorage=require("./utils/webViewStorage");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/Chatbotsdk.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Chatbot=function Chatbot(_ref){var api_key=_ref.api_key,user_id=_ref.user_id,user_token=_ref.user_token,_ref$show_floating_bu=_ref.show_floating_button,show_floating_button=_ref$show_floating_bu===void 0?true:_ref$show_floating_bu,onEvent=_ref.onEvent,onMessage=_ref.onMessage,_ref$isFullScreen=_ref.isFullScreen,isFullScreen=_ref$isFullScreen===void 0?true:_ref$isFullScreen,_ref$enableAnimation=_ref.enableAnimation,enableAnimation=_ref$enableAnimation===void 0?true:_ref$enableAnimation,onOpen=_ref.onOpen,onClose=_ref.onClose,user_profile=_ref.user_profile;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isWebViewVisible=_useState2[0],setIsWebViewVisible=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),chatbotConfig=_useState4[0],setChatbotConfig=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2.default)(_useState5,2),loading=_useState6[0],setLoading=_useState6[1];var webViewRef=(0,_react.useRef)(null);var fadeAnim=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var isFirstLoadRef=(0,_react.useRef)(true);var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),toastVisible=_useState8[0],setToastVisible=_useState8[1];var _useState9=(0,_react.useState)(""),_useState10=(0,_slicedToArray2.default)(_useState9,2),toastMessage=_useState10[0],setToastMessage=_useState10[1];var _useState11=(0,_react.useState)(),_useState12=(0,_slicedToArray2.default)(_useState11,2),effectiveUserId=_useState12[0],setEffectiveUserId=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=(0,_slicedToArray2.default)(_useState13,2),isStorageReady=_useState14[0],setIsStorageReady=_useState14[1];var pendingStorageOps=(0,_react.useRef)([]);var memoryCache=(0,_react.useRef)({});var _useState15=(0,_react.useState)({os:"",browser:""}),_useState16=(0,_slicedToArray2.default)(_useState15,2),systemInfo=_useState16[0],setSystemInfo=_useState16[1];var chatbotConfigForEvents=(0,_react.useMemo)(function(){return{userId:effectiveUserId,isAnonymous:!user_id&&user_id!==0};},[effectiveUserId,user_id]);var _useChatbotEvents=(0,_useChatbotEvents2.useChatbotEvents)({api_key:api_key,chatbotConfig:chatbotConfigForEvents!=null?chatbotConfigForEvents:{},user_profile:user_profile,onEvent:onEvent,systemInfo:systemInfo!=null?systemInfo:{os:"",browser:""}}),emitEvent=_useChatbotEvents.emitEvent,onInternalEvent=_useChatbotEvents.onInternalEvent;var triggerAppInit=function triggerAppInit(){if(webViewRef.current){webViewRef.current.injectJavaScript(`
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 _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/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=function Chatbot(_ref){var api_key=_ref.api_key,user_id=_ref.user_id,user_token=_ref.user_token,_ref$show_floating_bu=_ref.show_floating_button,show_floating_button=_ref$show_floating_bu===void 0?true:_ref$show_floating_bu,onEvent=_ref.onEvent,onMessage=_ref.onMessage,_ref$isFullScreen=_ref.isFullScreen,isFullScreen=_ref$isFullScreen===void 0?true:_ref$isFullScreen,_ref$enableAnimation=_ref.enableAnimation,enableAnimation=_ref$enableAnimation===void 0?true:_ref$enableAnimation,onOpen=_ref.onOpen,onClose=_ref.onClose,user_profile=_ref.user_profile;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isWebViewVisible=_useState2[0],setIsWebViewVisible=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2.default)(_useState3,2),chatbotConfig=_useState4[0],setChatbotConfig=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2.default)(_useState5,2),loading=_useState6[0],setLoading=_useState6[1];var webViewRef=(0,_react.useRef)(null);var fadeAnim=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var isFirstLoadRef=(0,_react.useRef)(true);var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2.default)(_useState7,2),toastVisible=_useState8[0],setToastVisible=_useState8[1];var _useState9=(0,_react.useState)(""),_useState10=(0,_slicedToArray2.default)(_useState9,2),toastMessage=_useState10[0],setToastMessage=_useState10[1];var _useState11=(0,_react.useState)(),_useState12=(0,_slicedToArray2.default)(_useState11,2),effectiveUserId=_useState12[0],setEffectiveUserId=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=(0,_slicedToArray2.default)(_useState13,2),isStorageReady=_useState14[0],setIsStorageReady=_useState14[1];var pendingStorageOps=(0,_react.useRef)([]);var memoryCache=(0,_react.useRef)({});var _useState15=(0,_react.useState)({os:"",browser:""}),_useState16=(0,_slicedToArray2.default)(_useState15,2),systemInfo=_useState16[0],setSystemInfo=_useState16[1];var chatbotConfigForEvents=(0,_react.useMemo)(function(){return{userId:effectiveUserId,isAnonymous:!user_id&&user_id!==0};},[effectiveUserId,user_id]);var _useChatbotEvents=(0,_useChatbotEvents2.useChatbotEvents)({api_key:api_key,chatbotConfig:chatbotConfigForEvents!=null?chatbotConfigForEvents:{},user_profile:user_profile,onEvent:onEvent,systemInfo:systemInfo!=null?systemInfo:{os:"",browser:""}}),emitEvent=_useChatbotEvents.emitEvent,onInternalEvent=_useChatbotEvents.onInternalEvent;var triggerAppInit=function triggerAppInit(){if(webViewRef.current){webViewRef.current.injectJavaScript(`
2
2
  // Trigger APP_READY equivalent
3
3
  window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'APP_READY' }));
4
4
  true;
5
5
  `);}};var executeStorageOp=(0,_react.useCallback)(function(operation){if(isStorageReady){operation();}else{pendingStorageOps.current.push(operation);}},[isStorageReady]);var handleMessage=(0,_react.useCallback)(function(event){var _webViewRef$current;var data=event.nativeEvent.data;try{var parsedData=JSON.parse(data);if(Object.values(_webViewStorage.StorageMessageType).includes(parsedData.type)){var storageMessage=parsedData;switch(storageMessage.type){case _webViewStorage.StorageMessageType.STORAGE_READY:setIsStorageReady(true);pendingStorageOps.current.forEach(function(op){return op();});pendingStorageOps.current=[];(_webViewRef$current=webViewRef.current)==null?void 0:_webViewRef$current.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));break;case _webViewStorage.StorageMessageType.STORAGE_RESPONSE:if(storageMessage.key&&storageMessage.value){memoryCache.current[storageMessage.key]=storageMessage.value;if(storageMessage.key==="rblyn_anon"){setEffectiveUserId(storageMessage.value);}}break;case _webViewStorage.StorageMessageType.STORAGE_ERROR:_logger.logger.error("WebView storage error:",storageMessage.error);break;}return;}if(__DEV__){if((parsedData==null?void 0:parsedData.type)==="CONSOLE"){console.log(`WebView ${parsedData==null?void 0:parsedData.level}:`,parsedData==null?void 0:parsedData.data);return;}if((parsedData==null?void 0:parsedData.type)==="ERROR"){console.error("WebView Error:",parsedData==null?void 0:parsedData.data);return;}}if((parsedData==null?void 0:parsedData.type)==="SYSTEM_INFO"){var _parsedData$data;setSystemInfo((_parsedData$data=parsedData==null?void 0:parsedData.data)!=null?_parsedData$data:{os:"",browser:""});return;}if((parsedData==null?void 0:parsedData.type)==="APP_READY"){emitEvent(_events.ChatbotEventType.CHATBOT_APP_READY);if(webViewRef.current&&isWebViewVisible){var _webViewRef$current2,_webViewRef$current3;(_webViewRef$current2=webViewRef.current)==null?void 0:_webViewRef$current2.injectJavaScript((0,_systemInfo.getBrowserAndOSInfoScript)());var messageData={name:"registerUserId",action:"registerUserId",data:{userId:effectiveUserId,token:user_token?`${user_token}`:undefined,userProfile:Object.assign({},user_profile,(0,_systemInfo.getSystemInfo)(systemInfo))}};_logger.logger.debug("messageData====>",JSON.stringify(messageData));(_webViewRef$current3=webViewRef.current)==null?void 0:_webViewRef$current3.injectJavaScript(`
6
6
  window.postMessage(${JSON.stringify({name:"openFrame",domain:"app-domain.com"})}, '*');
7
7
  window.postMessage(${JSON.stringify(messageData)}, '*');
8
- `);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$config,_orgInfo$brand_config,_orgInfo$config2;setChatbotConfig({brand_color:(orgInfo==null?void 0:(_orgInfo$config=orgInfo.config)==null?void 0:_orgInfo$config.brand_colour)||"#007AFF",image_url:(orgInfo==null?void 0:(_orgInfo$brand_config=orgInfo.brand_config)==null?void 0:_orgInfo$brand_config.launcher_logo_url)||"",welcome_message:(orgInfo==null?void 0:(_orgInfo$config2=orgInfo.config)==null?void 0:_orgInfo$config2.welcome_message)||""});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to fetch chatbot configuration"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.NETWORK_ERROR,context:{api_key:api_key,user_id:user_id}});}finally{setLoading(false);}});return function fetchChatbotConfig(){return _ref3.apply(this,arguments);};}();if(api_key&&effectiveUserId){fetchChatbotConfig();}},[api_key,effectiveUserId,user_token]);function constructUrl(){if(!effectiveUserId)return"";var params=new URLSearchParams({id:api_key});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL,_version.SDK_VERSION);return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{onPress:function onPress(){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_CLICKED);openWebView();},brandColor:chatbotConfig.brand_color,imageUrl:chatbotConfig.image_url})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.webViewWrapper,{height:isWebViewVisible?"100%":0}],pointerEvents:isWebViewVisible?"auto":"none",children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.fullScreenContainer,{opacity:fadeAnim}],children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{ref:webViewRef,source:{uri:constructUrl()},onMessage:handleMessage,style:styles.webview,containerStyle:isFullScreen?{width:screenDimensions.width,height:screenDimensions.height}: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);},startInLoadingState:isFirstLoadRef.current,onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});}})})})})]}),__DEV__&&(0,_jsxRuntime.jsx)(_DebugButton.default,{})]})});};var styles=_reactNative.StyleSheet.create({mainContainer:{flex:1,position:"relative"},webViewWrapper:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden",zIndex:1000},fullScreenContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"white",zIndex:1000},inlineContainer:{flex:1,backgroundColor:"white"},webview:{flex:1,backgroundColor:"white"}});var _default=exports.default=Chatbot;
8
+ `);}}switch(parsedData==null?void 0:parsedData.type){case"close_chatbot":closeWebView();break;case"CHATBOT_LOADED":emitEvent(_events.ChatbotEventType.CHATBOT_LOADED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZED,parsedData==null?void 0:parsedData.data);break;case"SESSION_REFRESHED":emitEvent(_events.ChatbotEventType.SESSION_REFRESHED,parsedData==null?void 0:parsedData.data);break;case"CHAT_INITIALIZATION_FAILED":emitEvent(_events.ChatbotEventType.CHAT_INITIALIZATION_FAILED,parsedData==null?void 0:parsedData.data);break;default:if(onMessage)onMessage(parsedData!=null?parsedData:{});}}catch(error){_ErrorTrackingService.errorTracker.trackError(error instanceof Error?error:new Error("Failed to parse WebView message"),"ChatbotSDK",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{messageData:data}});}},[emitEvent,isWebViewVisible,onMessage,systemInfo,effectiveUserId,user_token,user_profile]);(0,_react.useEffect)(function(){var initializeUserId=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var userId=user_id?String(user_id):undefined;if(!userId){userId=memoryCache.current["rblyn_anon"];if(!userId){userId=(0,_cookieUtils.generateUUID)();executeStorageOp(function(){var _webViewRef$current4;(_webViewRef$current4=webViewRef.current)==null?void 0:_webViewRef$current4.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.SET_STORAGE,"rblyn_anon",userId));});}}setEffectiveUserId(userId);});return function initializeUserId(){return _ref2.apply(this,arguments);};}();initializeUserId();},[user_id,executeStorageOp]);(0,_react.useEffect)(function(){if(webViewRef.current){webViewRef.current.injectJavaScript((0,_webViewStorage.getStorageScript)());executeStorageOp(function(){var _webViewRef$current5;(_webViewRef$current5=webViewRef.current)==null?void 0:_webViewRef$current5.injectJavaScript((0,_webViewStorage.createStorageMessage)(_webViewStorage.StorageMessageType.GET_STORAGE,"rblyn_anon"));});}},[]);(0,_react.useEffect)(function(){var fetchChatbotConfig=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){try{var _data$user;var endpointUrl=`${_constants.API_URL}/chat/chatbot/get/`;var payload={client_user_id:effectiveUserId,org_id:api_key,token:user_token,extra_info:{}};var response=yield fetch(endpointUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(payload)});if(!response.ok){throw new Error("Failed to fetch chatbot configuration");}var data=yield response.json();var orgInfo=data==null?void 0:(_data$user=data.user)==null?void 0:_data$user.org_info;if(orgInfo){var _orgInfo$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;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)||""}}};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});console.log("BASE_CHATBOT_URL SDK_VERSION",_constants.BASE_CHATBOT_URL);return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;}var openWebView=(0,_react.useCallback)(function(){setIsWebViewVisible(true);if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:1,duration:250,useNativeDriver:true}).start(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}else{fadeAnim.setValue(1);requestAnimationFrame(function(){onOpen==null?void 0:onOpen();emitEvent(_events.ChatbotEventType.CHATBOT_OPENED);if(!isFirstLoadRef.current){setTimeout(triggerAppInit,100);}});}},[enableAnimation,fadeAnim,onOpen,emitEvent]);var closeWebView=(0,_react.useCallback)(function(){if(webViewRef.current){webViewRef.current.postMessage(JSON.stringify({name:"closeFrame",domain:"app-domain.com"}));}var complete=function complete(){setIsWebViewVisible(false);onClose==null?void 0:onClose();emitEvent(_events.ChatbotEventType.CHATBOT_CLOSED);};if(enableAnimation){_reactNative.Animated.timing(fadeAnim,{toValue:0,duration:200,useNativeDriver:true}).start(complete);}else{fadeAnim.setValue(0);requestAnimationFrame(complete);}},[enableAnimation,fadeAnim,onClose,emitEvent]);(0,_react.useEffect)(function(){if(show_floating_button&&chatbotConfig){emitEvent(_events.ChatbotEventType.CHATBOT_BUTTON_LOADED);}},[show_floating_button,chatbotConfig,emitEvent]);var getScreenDimensions=function getScreenDimensions(){var windowHeight=_reactNative.Dimensions.get("window").height;var windowWidth=_reactNative.Dimensions.get("window").width;var statusBarHeight=_reactNative.Platform.OS==="ios"?0:_reactNative.StatusBar.currentHeight||0;return{height:windowHeight-statusBarHeight,width:windowWidth};};var screenDimensions=getScreenDimensions();(0,_react.useEffect)(function(){if(__DEV__){(0,_debugConfig.enableNetworkDebug)();}},[]);return(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotSDK",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.mainContainer,children:[!loading&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"FloatingButton",children:show_floating_button&&api_key&&chatbotConfig&&(0,_jsxRuntime.jsx)(_FloatingButton.default,{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:1}],children:(0,_jsxRuntime.jsx)(_ErrorBoundary.ErrorBoundary,{componentName:"ChatbotWebView",children:(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{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);},startInLoadingState:isFirstLoadRef.current,onLoadEnd:function onLoadEnd(){var _webViewRef$current6;if(__DEV__){(0,_debugConfig.enableWebViewDebug)(webViewRef);}(_webViewRef$current6=webViewRef.current)==null?void 0:_webViewRef$current6.injectJavaScript(`
9
+ if (!document.querySelector('meta[name="viewport"]')) {
10
+ var meta = document.createElement('meta');
11
+ meta.name = 'viewport';
12
+ meta.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no';
13
+ document.getElementsByTagName('head')[0].appendChild(meta);
14
+ }
15
+
16
+ if (!document.querySelector('#injectedStyle')) {
17
+ const style = document.createElement('style');
18
+ style.id = 'injectedStyle';
19
+ style.textContent = \`
20
+ html, body, #root, #__next {
21
+ height: 100% !important;
22
+ min-height: 100% !important;
23
+ overflow: hidden !important;
24
+ }
25
+ \`;
26
+ document.head.appendChild(style);
27
+ }
28
+
29
+ window.sendToChatbot = function(message) {
30
+ window.ReactNativeWebView.postMessage(JSON.stringify(message));
31
+ };
32
+
33
+ // Only create observer if it doesn't exist
34
+ if (!window.closeButtonObserver) {
35
+ // Setup mutation observer to watch for close button
36
+ window.closeButtonObserver = new MutationObserver(function(mutations) {
37
+ const closeButton = document.querySelector('.chatbot-close-button');
38
+ if (closeButton && !closeButton.hasAttribute('listener-attached')) {
39
+ closeButton.setAttribute('listener-attached', 'true');
40
+ closeButton.addEventListener('click', () => {
41
+ try {
42
+ const message = { type: 'close_chatbot' };
43
+ window.ReactNativeWebView.postMessage(JSON.stringify(message));
44
+ } catch (error) {
45
+ console.error('Error sending close message:', error);
46
+ }
47
+ });
48
+ console.log('Close button listener attached');
49
+ }
50
+ });
51
+
52
+ // Start observing
53
+ window.closeButtonObserver.observe(document.body, {
54
+ childList: true,
55
+ subtree: true
56
+ });
57
+
58
+ // Initial check for existing button
59
+ const existingButton = document.querySelector('.chatbot-close-button');
60
+ if (existingButton && !existingButton.hasAttribute('listener-attached')) {
61
+ existingButton.setAttribute('listener-attached', 'true');
62
+ existingButton.addEventListener('click', () => {
63
+ try {
64
+ const message = { type: 'close_chatbot' };
65
+ window.ReactNativeWebView.postMessage(JSON.stringify(message));
66
+ } catch (error) {
67
+ console.error('Error sending close message:', error);
68
+ }
69
+ });
70
+ console.log('Close button listener attached to existing button');
71
+ }
72
+ }
73
+
74
+ true;
75
+ `);isFirstLoadRef.current=false;},onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;_ErrorTrackingService.errorTracker.trackError(new Error(nativeEvent.description),"ChatbotWebView",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{url:nativeEvent.url,code:nativeEvent.code}});}})})})})]}),__DEV__&&(0,_jsxRuntime.jsx)(_DebugButton.default,{})]})});};var styles=_reactNative.StyleSheet.create({mainContainer:{flex:1,position:"relative",overflow:"visible"},webViewWrapper:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"visible",zIndex:10000,backgroundColor:"#ffffff"},fullScreenContainer:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"white",zIndex:10000,overflow:"visible"},inlineContainer:{flex:1,backgroundColor:"white"},webview:{flex:1,backgroundColor:"white",zIndex:10000}});var _default=exports.default=Chatbot;
9
76
  //# sourceMappingURL=Chatbotsdk.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","_version","_systemInfo","_useChatbotEvents2","_events","_logger","_debugConfig","_DebugButton","_ErrorBoundary","_errorConstants","_ErrorTrackingService","_cookieUtils","_webViewStorage","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Chatbot","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$config","_orgInfo$brand_config","_orgInfo$config2","brand_color","config","brand_colour","image_url","brand_config","launcher_logo_url","welcome_message","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","SDK_VERSION","toString","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","webViewWrapper","pointerEvents","fullScreenContainer","opacity","WebView","ref","source","uri","webview","containerStyle","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onError","syntheticEvent","description","code","StyleSheet","create","flex","position","top","left","right","bottom","overflow","zIndex","backgroundColor","inlineContainer","_default","exports"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":"iWAAA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,eAAA,CAAAC,sBAAA,CAAAJ,OAAA,sBACA,IAAAK,UAAA,CAAAL,OAAA,gBACA,IAAAM,QAAA,CAAAN,OAAA,cACA,IAAAO,WAAA,CAAAP,OAAA,uBACA,IAAAQ,kBAAA,CAAAR,OAAA,6BACA,IAAAS,OAAA,CAAAT,OAAA,mBACA,IAAAU,OAAA,CAAAV,OAAA,mBACA,IAAAW,YAAA,CAAAX,OAAA,wBACA,IAAAY,YAAA,CAAAR,sBAAA,CAAAJ,OAAA,8BACA,IAAAa,cAAA,CAAAb,OAAA,+BACA,IAAAc,eAAA,CAAAd,OAAA,+BAMA,IAAAe,qBAAA,CAAAf,OAAA,oCACA,IAAAgB,YAAA,CAAAhB,OAAA,wBACA,IAAAiB,eAAA,CAAAjB,OAAA,2BAKgC,IAAAkB,WAAA,CAAAlB,OAA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H,WAAA,CAAAsO,GAAA,EAAC5O,YAAA,CAAAe,OAAW,GAAE,CAAC,EACvB,CAAC,CACM,CAAC,CAEpB,CAAC,CAED,GAAM,CAAAoO,MAAM,CAAGmC,uBAAU,CAACC,MAAM,CAAC,CAC/BnC,aAAa,CAAE,CACboC,IAAI,CAAE,CAAC,CACPC,QAAQ,CAAE,UACZ,CAAC,CACD/B,cAAc,CAAE,CACd+B,QAAQ,CAAE,UAAU,CACpBC,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTC,QAAQ,CAAE,QAAQ,CAClBC,MAAM,CAAE,IACV,CAAC,CACDnC,mBAAmB,CAAE,CACnB6B,QAAQ,CAAE,UAAU,CACpBC,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTG,eAAe,CAAE,OAAO,CACxBD,MAAM,CAAE,IACV,CAAC,CACDE,eAAe,CAAE,CACfT,IAAI,CAAE,CAAC,CACPQ,eAAe,CAAE,OACnB,CAAC,CACD9B,OAAO,CAAE,CACPsB,IAAI,CAAE,CAAC,CACPQ,eAAe,CAAE,OACnB,CACF,CAAC,CAAC,CAAC,IAAAE,QAAA,CAAAC,OAAA,CAAApR,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","_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","_ref","api_key","user_id","user_token","_ref$show_floating_bu","show_floating_button","onEvent","onMessage","_ref$isFullScreen","isFullScreen","_ref$enableAnimation","enableAnimation","onOpen","onClose","user_profile","_useState","useState","_useState2","_slicedToArray2","isWebViewVisible","setIsWebViewVisible","_useState3","_useState4","chatbotConfig","setChatbotConfig","_useState5","_useState6","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","_useState7","_useState8","toastVisible","setToastVisible","_useState9","_useState10","toastMessage","setToastMessage","_useState11","_useState12","effectiveUserId","setEffectiveUserId","_useState13","_useState14","isStorageReady","setIsStorageReady","pendingStorageOps","memoryCache","_useState15","os","browser","_useState16","systemInfo","setSystemInfo","chatbotConfigForEvents","useMemo","userId","isAnonymous","_useChatbotEvents","useChatbotEvents","emitEvent","onInternalEvent","triggerAppInit","injectJavaScript","executeStorageOp","useCallback","operation","push","handleMessage","event","_webViewRef$current","data","nativeEvent","parsedData","JSON","parse","values","StorageMessageType","includes","type","storageMessage","STORAGE_READY","forEach","op","createStorageMessage","GET_STORAGE","STORAGE_RESPONSE","key","value","STORAGE_ERROR","logger","error","__DEV__","console","log","level","_parsedData$data","ChatbotEventType","CHATBOT_APP_READY","_webViewRef$current2","_webViewRef$current3","getBrowserAndOSInfoScript","messageData","name","action","token","undefined","userProfile","assign","getSystemInfo","debug","stringify","domain","closeWebView","CHATBOT_LOADED","CHAT_INITIALIZED","SESSION_REFRESHED","CHAT_INITIALIZATION_FAILED","errorTracker","trackError","Error","ErrorTypes","RUNTIME_ERROR","context","useEffect","initializeUserId","_ref2","_asyncToGenerator2","String","generateUUID","_webViewRef$current4","SET_STORAGE","apply","arguments","getStorageScript","_webViewRef$current5","fetchChatbotConfig","_ref3","_data$user","endpointUrl","API_URL","payload","client_user_id","org_id","extra_info","response","fetch","method","headers","body","ok","json","orgInfo","user","org_info","_orgInfo$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","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","url","NETWORK_ERROR","constructUrl","params","URLSearchParams","id","BASE_CHATBOT_URL","toString","openWebView","timing","toValue","duration","useNativeDriver","start","CHATBOT_OPENED","setTimeout","setValue","requestAnimationFrame","postMessage","complete","CHATBOT_CLOSED","CHATBOT_BUTTON_LOADED","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","enableNetworkDebug","jsx","ErrorBoundary","componentName","children","jsxs","View","style","styles","mainContainer","Fragment","onPress","CHATBOT_BUTTON_CLICKED","brandColor","imageUrl","webViewWrapper","pointerEvents","fullScreenContainer","opacity","WebView","ref","source","uri","webview","containerStyle","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current6","enableWebViewDebug","onError","syntheticEvent","description","code","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,WAOA,IAAAC,YAAA,CAAAD,OAAA,iBASA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,eAAA,CAA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Ae,CAAE,SACnB,CAAC,CACDrC,mBAAmB,CAAE,CACnB/D,QAAQ,CAAE,UAAU,CACpB+F,GAAG,CAAE,CAAC,CACNC,IAAI,CAAE,CAAC,CACPC,KAAK,CAAE,CAAC,CACRC,MAAM,CAAE,CAAC,CACTE,eAAe,CAAE,OAAO,CACxBD,MAAM,CAAE,KAAK,CACbL,QAAQ,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,CAAA7S,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/personal/robylon-react-native-sdk/src/FloatingButton.tsx";var FloatingButton=function FloatingButton(_ref){var onPress=_ref.onPress,_ref$brandColor=_ref.brandColor,brandColor=_ref$brandColor===void 0?"#007AFF":_ref$brandColor,imageUrl=_ref.imageUrl;var handleImageError=function handleImageError(){_ErrorTrackingService.errorTracker.trackError(new Error("Failed to load button image"),"FloatingButton",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{imageUrl:imageUrl}});};return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,{backgroundColor:brandColor}],onPress:onPress,children:imageUrl?(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:imageUrl},style:styles.buttonImage,onError:handleImageError}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonText,children:"Chat"})});};var styles=_reactNative.StyleSheet.create({button:{position:"absolute",bottom:20,right:20,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},buttonText:{color:"white",fontSize:16,fontWeight:"bold"},buttonImage:{width:48,height:48,borderRadius:24}});var _default=exports.default=FloatingButton;
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/personal/robylon-react-native-sdk/src/FloatingButton.tsx";var FloatingButton=function FloatingButton(_ref){var onPress=_ref.onPress,_ref$brandColor=_ref.brandColor,brandColor=_ref$brandColor===void 0?"#007AFF":_ref$brandColor,imageUrl=_ref.imageUrl,isWebViewVisible=_ref.isWebViewVisible;var handleImageError=function handleImageError(){_ErrorTrackingService.errorTracker.trackError(new Error("Failed to load button image"),"FloatingButton",{type:_errorConstants.ErrorTypes.RUNTIME_ERROR,context:{imageUrl:imageUrl}});};return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,pointerEvents:isWebViewVisible?"none":"auto",children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.button,{backgroundColor:isWebViewVisible?"transparent":brandColor},isWebViewVisible&&styles.disabledButton],onPress:isWebViewVisible?undefined:onPress,activeOpacity:isWebViewVisible?1:0.7,children:imageUrl&&!isWebViewVisible?(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:imageUrl},style:styles.buttonImage}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonText,children:"Chat"})})});};var styles=_reactNative.StyleSheet.create({container:{position:"absolute",bottom:20,right:20,zIndex:998},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},buttonText:{color:"white",fontSize:16,fontWeight:"bold"},buttonImage:{width:48,height:48,borderRadius:24},disabledButton:{backgroundColor:"rgba(0, 0, 0, 0)"}});var _default=exports.default=FloatingButton;
2
2
  //# sourceMappingURL=FloatingButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_jsxRuntime","_this","_jsxFileName","FloatingButton","_ref","onPress","_ref$brandColor","brandColor","imageUrl","handleImageError","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","jsx","TouchableOpacity","style","styles","button","backgroundColor","children","Image","source","uri","buttonImage","onError","Text","buttonText","StyleSheet","create","position","bottom","right","borderRadius","width","height","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","color","fontSize","fontWeight","_default","exports","default"],"sourceRoot":"../../src","sources":["FloatingButton.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,qBAAA,CAAAF,OAAA,oCACA,IAAAG,eAAA,CAAAH,OAAA,+BAAwD,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,0FAQxD,GAAM,CAAAC,cAA6C,CAAG,QAAhD,CAAAA,cAA6CA,CAAAC,IAAA,CAI7C,IAHJ,CAAAC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CAAAC,eAAA,CAAAF,IAAA,CACPG,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAG,SAAS,CAAAA,eAAA,CACtBE,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CAER,GAAM,CAAAC,gBAAgB,CAAG,QAAnB,CAAAA,gBAAgBA,CAAA,CAAS,CAC7BC,kCAAY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AE,CACVgB,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,EAAE,CACZC,UAAU,CAAE,MACd,CAAC,CACDrB,WAAW,CAAE,CACXU,KAAK,CAAE,EAAE,CACTC,MAAM,CAAE,EAAE,CACVF,YAAY,CAAE,EAChB,CACF,CAAC,CAAC,CAAC,IAAAa,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEYhD,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorTrackingService","_errorConstants","_jsxRuntime","_this","_jsxFileName","FloatingButton","_ref","onPress","_ref$brandColor","brandColor","imageUrl","isWebViewVisible","handleImageError","errorTracker","trackError","Error","type","ErrorTypes","RUNTIME_ERROR","context","jsx","View","style","styles","container","pointerEvents","children","TouchableOpacity","button","backgroundColor","disabledButton","undefined","activeOpacity","Image","source","uri","buttonImage","Text","buttonText","StyleSheet","create","position","bottom","right","zIndex","borderRadius","width","height","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","color","fontSize","fontWeight","_default","exports","default"],"sourceRoot":"../../src","sources":["FloatingButton.tsx"],"mappings":"mKAAA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,qBAAA,CAAAF,OAAA,oCACA,IAAAG,eAAA,CAAAH,OAAA,+BAAwD,IAAAI,WAAA,CAAAJ,OAAA,0BAAAK,KAAA,MAAAC,YAAA,0FASxD,GAAM,CAAAC,cAA6C,CAAG,QAAhD,CAAAA,cAA6CA,CAAAC,IAAA,CAK7C,IAJJ,CAAAC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CAAAC,eAAA,CAAAF,IAAA,CACPG,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAG,SAAS,CAAAA,eAAA,CACtBE,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,gBAAgB,CAAAL,IAAA,CAAhBK,gBAAgB,CAEhB,GAAM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CACTiB,QAAQ,CAAE,UAAU,CACpBC,MAAM,CAAE,EAAE,CACVC,KAAK,CAAE,EAAE,CACTC,MAAM,CAAE,GACV,CAAC,CACDhB,MAAM,CAAE,CACNiB,YAAY,CAAE,EAAE,CAChBC,KAAK,CAAE,EAAE,CACTC,MAAM,CAAE,EAAE,CACVC,cAAc,CAAE,QAAQ,CACxBC,UAAU,CAAE,QAAQ,CACpBC,SAAS,CAAE,CAAC,CACZC,WAAW,CAAE,MAAM,CACnBC,YAAY,CAAE,CAAEN,KAAK,CAAE,CAAC,CAAEC,MAAM,CAAE,CAAE,CAAC,CACrCM,aAAa,CAAE,IAAI,CACnBC,YAAY,CAAE,IAChB,CAAC,CACDhB,UAAU,CAAE,CACViB,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,EAAE,CACZC,UAAU,CAAE,MACd,CAAC,CACDrB,WAAW,CAAE,CACXU,KAAK,CAAE,EAAE,CACTC,MAAM,CAAE,EAAE,CACVF,YAAY,CAAE,EAChB,CAAC,CACDf,cAAc,CAAE,CACdD,eAAe,CAAE,kBACnB,CACF,CAAC,CAAC,CAAC,IAAA6B,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEYvD,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 _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/personal/robylon-react-native-sdk/src/Toast.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var 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;
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/personal/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","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","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,0FAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAP,wBAAAO,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WAAAA,CAAA,mBAAAA,CAAA,qBAAAA,CAAA,QAAAK,OAAA,CAAAL,CAAA,MAAAG,CAAA,CAAAJ,wBAAA,CAAAG,CAAA,KAAAC,CAAA,EAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,SAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,MAAAQ,CAAA,EAAAC,SAAA,OAAAC,CAAA,CAAAC,MAAA,CAAAC,cAAA,EAAAD,MAAA,CAAAE,wBAAA,SAAAC,CAAA,IAAAd,CAAA,gBAAAc,CAAA,KAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,CAAAc,CAAA,OAAAG,CAAA,CAAAP,CAAA,CAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,CAAAc,CAAA,OAAAG,CAAA,GAAAA,CAAA,CAAAV,GAAA,EAAAU,CAAA,CAAAC,GAAA,EAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,CAAAM,CAAA,CAAAG,CAAA,EAAAT,CAAA,CAAAM,CAAA,EAAAd,CAAA,CAAAc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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,CAAAzD,OAAA,CAEYc,KAAK","ignoreList":[]}
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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AAK,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
- Object.defineProperty(exports,"__esModule",{value:true});exports.BASE_CHATBOT_URL=exports.API_URL=void 0;var BASE_CHATBOT_DOMAIN=process&&process.env&&process.env.CHATBOT_DOMAIN||"http://192.168.1.6:5174"||"";var CHATBOT_PATH=process&&process.env&&process.env.CHATBOT_PATH||"chatbot-plugin"||"";var BASE_CHATBOT_URL=exports.BASE_CHATBOT_URL=`${BASE_CHATBOT_DOMAIN}/${CHATBOT_PATH}`;var API_URL=exports.API_URL=process&&process.env&&process.env.API_URL||"https://stage-api.robylon.ai";
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.BASE_CHATBOT_URL=exports.API_URL=void 0;var BASE_CHATBOT_DOMAIN=process&&process.env&&process.env.CHATBOT_DOMAIN||"https://staging.d2s3wsqyyond1h.amplifyapp.com"||"";var CHATBOT_PATH=process&&process.env&&process.env.CHATBOT_PATH||"chatbot-plugin"||"";var BASE_CHATBOT_URL=exports.BASE_CHATBOT_URL=`${BASE_CHATBOT_DOMAIN}/${CHATBOT_PATH}`;var API_URL=exports.API_URL=process&&process.env&&process.env.API_URL||"https://stage-api.robylon.ai";
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["BASE_CHATBOT_DOMAIN","process","env","process.env","CHATBOT_DOMAIN","CHATBOT_PATH","BASE_CHATBOT_URL","exports","API_URL"],"sourceRoot":"../../src","sources":["constants.ts"],"mappings":"yGAAA,GAAM,CAAAA,mBAAmB,CAAGC,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAC,cAAA,6BAA8B,EAAE,CAC5D,GAAM,CAAAC,YAAY,CAAGJ,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAE,YAAA,oBAA4B,EAAE,CAC5C,GAAM,CAAAC,gBAAgB,CAAAC,OAAA,CAAAD,gBAAA,CAAG,GAAGN,mBAAmB,IAAIK,YAAY,EAAE,CACjE,GAAM,CAAAG,OAAO,CAAAD,OAAA,CAAAC,OAAA,CAAAP,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAK,OAAA,gCAAsB","ignoreList":[]}
1
+ {"version":3,"names":["BASE_CHATBOT_DOMAIN","process","env","process.env","CHATBOT_DOMAIN","CHATBOT_PATH","BASE_CHATBOT_URL","exports","API_URL"],"sourceRoot":"../../src","sources":["constants.ts"],"mappings":"yGAAA,GAAM,CAAAA,mBAAmB,CAAGC,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAC,cAAA,mDAA8B,EAAE,CAC5D,GAAM,CAAAC,YAAY,CAAGJ,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAE,YAAA,oBAA4B,EAAE,CAC5C,GAAM,CAAAC,gBAAgB,CAAAC,OAAA,CAAAD,gBAAA,CAAG,GAAGN,mBAAmB,IAAIK,YAAY,EAAE,CACjE,GAAM,CAAAG,OAAO,CAAAD,OAAA,CAAAC,OAAA,CAAAP,OAAA,EAAAA,OAAA,CAAAC,GAAA,EAAAC,WAAA,CAAAK,OAAA,gCAAsB","ignoreList":[]}
@@ -1,2 +1,3 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.openChatbot=void 0;var _reactNative=require("react-native");var _constants=require("./constants");var openChatbot=exports.openChatbot=function openChatbot(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));var url=`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;_reactNative.Linking.openURL(url);};
1
+
2
+ //# sourceMappingURL=openChatbot.js.mape",{value:true});exports.openChatbot=void 0;var _reactNative=require("react-native");var _constants=require("./constants");var openChatbot=exports.openChatbot=function openChatbot(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));var url=`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;_reactNative.Linking.openURL(url);};
2
3
  //# sourceMappingURL=openChatbot.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_constants","openChatbot","exports","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","Object","assign","id","url","BASE_CHATBOT_URL","toString","Linking","openURL"],"sourceRoot":"../../src","sources":["openChatbot.ts"],"mappings":"oFAAA,IAAAA,YAAA,CAAAC,OAAA,iBACA,IAAAC,UAAA,CAAAD,OAAA,gBAEO,GAAM,CAAAE,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,QAAd,CAAAA,WAAWA,CACtBE,SAAiB,CAER,IADT,CAAAC,gBAAwC,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,MAAAE,SAAA,CAAAF,SAAA,IAAG,CAAC,CAAC,CAE7C,GAAM,CAAAG,MAAM,CAAG,GAAI,CAAAC,eAAe,CAAAC,MAAA,CAAAC,MAAA,EAAGC,EAAE,CAAET,SAAS,EAAKC,gBAAgB,CAAE,CAAC,CAC1E,GAAM,CAAAS,GAAG,CAAG,GAAGC,2BAAgB,IAAIN,MAAM,CAACO,QAAQ,CAAC,CAAC,EAAE,CACtDC,oBAAO,CAACC,OAAO,CAACJ,GAAG,CAAC,CACtB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["openChatbot.tsx"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function get(){return _version.SDK_VERSION;}});var _version=require("./versions/version.staging");
1
+ Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function get(){return _version.SDK_VERSION;}});var _version=require("./versions/version.dev");
2
2
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION="0.0.0-dev.0";
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.21-dev.0';
2
2
  //# sourceMappingURL=version.dev.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SDK_VERSION","exports"],"sourceRoot":"../../../src","sources":["versions/version.dev.ts"],"mappings":"oFACO,GAAM,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["SDK_VERSION","exports"],"sourceRoot":"../../../src","sources":["versions/version.dev.ts"],"mappings":"oFACO,GAAM,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,cAAc","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.9';
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.SDK_VERSION=void 0;var SDK_VERSION=exports.SDK_VERSION='2.0.19-staging.60';
2
2
  //# sourceMappingURL=version.staging.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SDK_VERSION","exports"],"sourceRoot":"../../../src","sources":["versions/version.staging.ts"],"mappings":"oFACO,GAAM,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["SDK_VERSION","exports"],"sourceRoot":"../../../src","sources":["versions/version.staging.ts"],"mappings":"oFACO,GAAM,CAAAA,WAAW,CAAAC,OAAA,CAAAD,WAAA,CAAG,mBAAmB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ChatbotWebview=void 0;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 _constants=require("./constants");var _LoadingIndicator=_interopRequireDefault(require("./LoadingIndicator"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/ChatbotWebview.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var constructUrl=function constructUrl(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;};var ChatbotWebview=exports.ChatbotWebview=function ChatbotWebview(_ref){var chatbotId=_ref.chatbotId,additionalParams=_ref.additionalParams;var _useState=(0,_react.useState)(""),_useState2=(0,_slicedToArray2.default)(_useState,2),url=_useState2[0],setUrl=_useState2[1];(0,_react.useEffect)(function(){setUrl(constructUrl(chatbotId,additionalParams));},[chatbotId,additionalParams]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flex:1},children:url?(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{source:{uri:url},startInLoadingState:true,renderLoading:function renderLoading(){return(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{});}}):(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{})});};
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ChatbotWebview=void 0;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 _constants=require("./constants");var _LoadingIndicator=_interopRequireDefault(require("./LoadingIndicator"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/jobinabraham/Developer/personal/robylon-react-native-sdk/src/ChatbotWebview.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 constructUrl=function constructUrl(chatbotId){var additionalParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var params=new URLSearchParams(Object.assign({id:chatbotId},additionalParams));return`${_constants.BASE_CHATBOT_URL}?${params.toString()}`;};var ChatbotWebview=exports.ChatbotWebview=function ChatbotWebview(_ref){var chatbotId=_ref.chatbotId,additionalParams=_ref.additionalParams;var _useState=(0,_react.useState)(""),_useState2=(0,_slicedToArray2.default)(_useState,2),url=_useState2[0],setUrl=_useState2[1];(0,_react.useEffect)(function(){setUrl(constructUrl(chatbotId,additionalParams));},[chatbotId,additionalParams]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{flex:1},children:url?(0,_jsxRuntime.jsx)(_reactNativeWebview.WebView,{source:{uri:url},startInLoadingState:true,renderLoading:function renderLoading(){return(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{});}}):(0,_jsxRuntime.jsx)(_LoadingIndicator.default,{})});};
2
2
  //# sourceMappingURL=ChatbotWebview.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_constants","_LoadingIndicator","_interopRequireDefault","_jsxRuntime","_this","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","constructUrl","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","assign","id","BASE_CHATBOT_URL","toString","ChatbotWebview","exports","_ref","_useState","useState","_useState2","_slicedToArray2","url","setUrl","useEffect","jsx","View","style","flex","children","WebView","source","uri","startInLoadingState","renderLoading"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":"sQACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,UAAA,CAAAH,OAAA,gBACA,IAAAI,iBAAA,CAAAC,sBAAA,CAAAL,OAAA,wBAAkD,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,KAAA,MAAAC,YAAA,mGAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAX,wBAAAW,CAAA,CAAAE,CAAA,MAAAA,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D,CAAC,CAEM,GAAM,CAAAC,cAA6C,CAAAC,OAAA,CAAAD,cAAA,CAAG,QAAhD,CAAAA,cAA6CA,CAAAE,IAAA,CAGpD,IAFJ,CAAAb,SAAS,CAAAa,IAAA,CAATb,SAAS,CACTC,gBAAgB,CAAAY,IAAA,CAAhBZ,gBAAgB,CAEhB,IAAAa,SAAA,CAAsB,GAAAC,eAAQ,EAAS,EAAE,CAAC,CAAAC,UAAA,IAAAC,eAAA,CAAAhC,OAAA,EAAA6B,SAAA,IAAnCI,GAAG,CAAAF,UAAA,IAAEG,MAAM,CAAAH,UAAA,IAElB,GAAAI,gBAAS,EAAC,UAAM,CACdD,MAAM,CAACpB,YAAY,CAACC,SAAS,CAAEC,gBAAgB,CAAC,CAAC,CACnD,CAAC,CAAE,CAACD,SAAS,CAAEC,gBAAgB,CAAC,CAAC,CAEjC,MACE,GAAAzB,WAAA,CAAA6C,GAAA,EAAClD,YAAA,CAAAmD,IAAI,EAACC,KAAK,CAAE,CAAEC,IAAI,CAAE,CAAE,CAAE,CAAAC,QAAA,CACtBP,GAAG,CACF,GAAA1C,WAAA,CAAA6C,GAAA,EAACjD,mBAAA,CAAAsD,OAAO,EACNC,MAAM,CAAE,CAAEC,GAAG,CAAEV,GAAI,CAAE,CACrBW,mBAAmB,CAAE,IAAK,CAC1BC,aAAa,CAAE,QAAf,CAAAA,aAAaA,CAAA,QAAQ,GAAAtD,WAAA,CAAA6C,GAAA,EAAC/C,iBAAA,CAAAW,OAAgB,GAAE,CAAC,EAAC,CAC3C,CAAC,CAEF,GAAAT,WAAA,CAAA6C,GAAA,EAAC/C,iBAAA,CAAAW,OAAgB,GAAE,CACpB,CACG,CAAC,CAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_constants","_LoadingIndicator","_interopRequireDefault","_jsxRuntime","_this","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","constructUrl","chatbotId","additionalParams","arguments","length","undefined","params","URLSearchParams","assign","id","BASE_CHATBOT_URL","toString","ChatbotWebview","exports","_ref","_useState","useState","_useState2","_slicedToArray2","url","setUrl","useEffect","jsx","View","style","flex","children","WebView","source","uri","startInLoadingState","renderLoading"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":"sQACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,mBAAA,CAAAF,OAAA,yBACA,IAAAG,UAAA,CAAAH,OAAA,gBACA,IAAAI,iBAAA,CAAAC,sBAAA,CAAAL,OAAA,wBAAkD,IAAAM,WAAA,CAAAN,OAAA,0BAAAO,KAAA,MAAAC,YAAA,mGAAAT,wBAAAU,CAAA,CAAAC,CAAA,wBAAAC,OAAA,KAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAZ,uBAAA,UAAAA,wBAAAU,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,CAAAW,MAAA,CAAAC,cAAA,GAAAD,MAAA,CAAAE,wBAAA,CAAA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