@robylon/react-native-sdk 1.10.1-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/README.md +0 -0
- package/lib/commonjs/ChatbotWebview.js +45 -0
- package/lib/commonjs/ChatbotWebview.js.map +1 -0
- package/lib/commonjs/Chatbotsdk.js +310 -0
- package/lib/commonjs/Chatbotsdk.js.map +1 -0
- package/lib/commonjs/FloatingButton.js +61 -0
- package/lib/commonjs/FloatingButton.js.map +1 -0
- package/lib/commonjs/LoadingIndicator.js +21 -0
- package/lib/commonjs/LoadingIndicator.js.map +1 -0
- package/lib/commonjs/config.js +11 -0
- package/lib/commonjs/config.js.map +1 -0
- package/lib/commonjs/constants.js +10 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/global.d.js +8 -0
- package/lib/commonjs/global.d.js.map +1 -0
- package/lib/commonjs/index.js +21 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/openChatbot.js +18 -0
- package/lib/commonjs/openChatbot.js.map +1 -0
- package/lib/module/ChatbotWebview.js +34 -0
- package/lib/module/ChatbotWebview.js.map +1 -0
- package/lib/module/Chatbotsdk.js +301 -0
- package/lib/module/Chatbotsdk.js.map +1 -0
- package/lib/module/FloatingButton.js +54 -0
- package/lib/module/FloatingButton.js.map +1 -0
- package/lib/module/LoadingIndicator.js +14 -0
- package/lib/module/LoadingIndicator.js.map +1 -0
- package/lib/module/config.js +5 -0
- package/lib/module/config.js.map +1 -0
- package/lib/module/constants.js +4 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/global.d.js +7 -0
- package/lib/module/global.d.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/openChatbot.js +11 -0
- package/lib/module/openChatbot.js.map +1 -0
- package/lib/typescript/ChatbotWebview.d.ts +8 -0
- package/lib/typescript/ChatbotWebview.d.ts.map +1 -0
- package/lib/typescript/Chatbotsdk.d.ts +16 -0
- package/lib/typescript/Chatbotsdk.d.ts.map +1 -0
- package/lib/typescript/FloatingButton.d.ts +9 -0
- package/lib/typescript/FloatingButton.d.ts.map +1 -0
- package/lib/typescript/LoadingIndicator.d.ts +4 -0
- package/lib/typescript/LoadingIndicator.d.ts.map +1 -0
- package/lib/typescript/config.d.ts +5 -0
- package/lib/typescript/config.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +2 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/openChatbot.d.ts +2 -0
- package/lib/typescript/openChatbot.d.ts.map +1 -0
- package/package.json +63 -0
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatbotWebview = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeWebview = require("react-native-webview");
|
|
10
|
+
var _constants = require("./constants");
|
|
11
|
+
var _LoadingIndicator = _interopRequireDefault(require("./LoadingIndicator"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
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; }
|
|
15
|
+
// File: src/ChatbotWebview.tsx
|
|
16
|
+
|
|
17
|
+
const constructUrl = (chatbotId, additionalParams = {}) => {
|
|
18
|
+
const params = new URLSearchParams({
|
|
19
|
+
id: chatbotId,
|
|
20
|
+
...additionalParams
|
|
21
|
+
});
|
|
22
|
+
return `${_constants.BASE_CHATBOT_URL}?${params.toString()}`;
|
|
23
|
+
};
|
|
24
|
+
const ChatbotWebview = ({
|
|
25
|
+
chatbotId,
|
|
26
|
+
additionalParams
|
|
27
|
+
}) => {
|
|
28
|
+
const [url, setUrl] = (0, _react.useState)("");
|
|
29
|
+
(0, _react.useEffect)(() => {
|
|
30
|
+
setUrl(constructUrl(chatbotId, additionalParams));
|
|
31
|
+
}, [chatbotId, additionalParams]);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
33
|
+
style: {
|
|
34
|
+
flex: 1
|
|
35
|
+
}
|
|
36
|
+
}, url ? /*#__PURE__*/_react.default.createElement(_reactNativeWebview.WebView, {
|
|
37
|
+
source: {
|
|
38
|
+
uri: url
|
|
39
|
+
},
|
|
40
|
+
startInLoadingState: true,
|
|
41
|
+
renderLoading: () => /*#__PURE__*/_react.default.createElement(_LoadingIndicator.default, null)
|
|
42
|
+
}) : /*#__PURE__*/_react.default.createElement(_LoadingIndicator.default, null));
|
|
43
|
+
};
|
|
44
|
+
exports.ChatbotWebview = ChatbotWebview;
|
|
45
|
+
//# sourceMappingURL=ChatbotWebview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_constants","_LoadingIndicator","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","constructUrl","chatbotId","additionalParams","params","URLSearchParams","id","BASE_CHATBOT_URL","toString","ChatbotWebview","url","setUrl","useState","useEffect","createElement","View","style","flex","WebView","source","uri","startInLoadingState","renderLoading","exports"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAkD,SAAAK,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,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iBAAA,CAAAI,OAAgB,MAAE;EAAE,CAC3C,CAAC,gBAEFV,MAAA,CAAAU,OAAA,CAAA+B,aAAA,CAACnC,iBAAA,CAAAI,OAAgB,MAAE,CAEjB,CAAC;AAEX,CAAC;AAACwC,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeWebview = require("react-native-webview");
|
|
10
|
+
var _FloatingButton = _interopRequireDefault(require("./FloatingButton"));
|
|
11
|
+
var _constants = require("./constants");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
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; }
|
|
15
|
+
const ChatbotSDK = ({
|
|
16
|
+
api_key,
|
|
17
|
+
user_id,
|
|
18
|
+
user_token,
|
|
19
|
+
additional_params = {},
|
|
20
|
+
show_floating_button = true,
|
|
21
|
+
onMessage,
|
|
22
|
+
isFullScreen = true,
|
|
23
|
+
enableAnimation = true,
|
|
24
|
+
onOpen,
|
|
25
|
+
onClose
|
|
26
|
+
}) => {
|
|
27
|
+
const [isWebViewVisible, setIsWebViewVisible] = (0, _react.useState)(false);
|
|
28
|
+
const [chatbotConfig, setChatbotConfig] = (0, _react.useState)(null);
|
|
29
|
+
const [loading, setLoading] = (0, _react.useState)(true);
|
|
30
|
+
const webViewRef = (0, _react.useRef)(null);
|
|
31
|
+
const fadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
32
|
+
const isFirstLoadRef = (0, _react.useRef)(true);
|
|
33
|
+
const webViewUrl = (0, _react.useMemo)(() => constructUrl(), [api_key, user_id, additional_params]);
|
|
34
|
+
const stableAdditionalParams = (0, _react.useMemo)(() => additional_params, [JSON.stringify(additional_params)]);
|
|
35
|
+
const triggerAppInit = () => {
|
|
36
|
+
if (webViewRef.current) {
|
|
37
|
+
webViewRef.current.injectJavaScript(`
|
|
38
|
+
// Trigger APP_READY equivalent
|
|
39
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'APP_READY' }));
|
|
40
|
+
true;
|
|
41
|
+
`);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
(0, _react.useEffect)(() => {
|
|
45
|
+
const fetchChatbotConfig = async () => {
|
|
46
|
+
try {
|
|
47
|
+
var _data$user;
|
|
48
|
+
const endpointUrl = `https://stage-api.robylon.ai/users/auth/copilot/`;
|
|
49
|
+
const payload = {
|
|
50
|
+
client_user_id: user_id,
|
|
51
|
+
org_id: api_key,
|
|
52
|
+
token: user_token,
|
|
53
|
+
extra_info: stableAdditionalParams
|
|
54
|
+
};
|
|
55
|
+
const response = await fetch(endpointUrl, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
headers: {
|
|
58
|
+
"Content-Type": "application/json"
|
|
59
|
+
},
|
|
60
|
+
body: JSON.stringify(payload)
|
|
61
|
+
});
|
|
62
|
+
if (!response.ok) {
|
|
63
|
+
throw new Error("Failed to fetch chatbot configuration");
|
|
64
|
+
}
|
|
65
|
+
const data = await response.json();
|
|
66
|
+
const orgInfo = data === null || data === void 0 || (_data$user = data.user) === null || _data$user === void 0 ? void 0 : _data$user.org_info;
|
|
67
|
+
if (orgInfo) {
|
|
68
|
+
var _orgInfo$config, _orgInfo$brand_config, _orgInfo$config2;
|
|
69
|
+
setChatbotConfig({
|
|
70
|
+
brand_color: (orgInfo === null || orgInfo === void 0 || (_orgInfo$config = orgInfo.config) === null || _orgInfo$config === void 0 ? void 0 : _orgInfo$config.brand_colour) || "#007AFF",
|
|
71
|
+
image_url: (orgInfo === null || orgInfo === void 0 || (_orgInfo$brand_config = orgInfo.brand_config) === null || _orgInfo$brand_config === void 0 ? void 0 : _orgInfo$brand_config.launcher_logo_url) || "",
|
|
72
|
+
welcome_message: (orgInfo === null || orgInfo === void 0 || (_orgInfo$config2 = orgInfo.config) === null || _orgInfo$config2 === void 0 ? void 0 : _orgInfo$config2.welcome_message) || ""
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error("Error fetching chatbot configuration:", error);
|
|
77
|
+
} finally {
|
|
78
|
+
setLoading(false);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
if (api_key && user_id) {
|
|
82
|
+
fetchChatbotConfig();
|
|
83
|
+
}
|
|
84
|
+
}, [api_key, user_id, user_token, stableAdditionalParams]);
|
|
85
|
+
function constructUrl() {
|
|
86
|
+
if (!user_id) return "";
|
|
87
|
+
const params = new URLSearchParams({
|
|
88
|
+
id: api_key,
|
|
89
|
+
user_id,
|
|
90
|
+
...additional_params
|
|
91
|
+
});
|
|
92
|
+
return `${_constants.BASE_CHATBOT_URL}?${params.toString()}`;
|
|
93
|
+
}
|
|
94
|
+
const openWebView = () => {
|
|
95
|
+
setIsWebViewVisible(true);
|
|
96
|
+
if (enableAnimation) {
|
|
97
|
+
_reactNative.Animated.timing(fadeAnim, {
|
|
98
|
+
toValue: 1,
|
|
99
|
+
duration: 250,
|
|
100
|
+
useNativeDriver: true
|
|
101
|
+
}).start(() => {
|
|
102
|
+
onOpen === null || onOpen === void 0 || onOpen();
|
|
103
|
+
if (!isFirstLoadRef.current) {
|
|
104
|
+
// If not first load, manually trigger initialization
|
|
105
|
+
setTimeout(triggerAppInit, 100);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
fadeAnim.setValue(1);
|
|
110
|
+
requestAnimationFrame(() => {
|
|
111
|
+
onOpen === null || onOpen === void 0 || onOpen();
|
|
112
|
+
if (!isFirstLoadRef.current) {
|
|
113
|
+
setTimeout(triggerAppInit, 100);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const closeWebView = () => {
|
|
119
|
+
if (webViewRef.current) {
|
|
120
|
+
console.log("closeWebView");
|
|
121
|
+
webViewRef.current.postMessage(JSON.stringify({
|
|
122
|
+
name: "closeFrame",
|
|
123
|
+
domain: "app-domain.com"
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
const complete = () => {
|
|
127
|
+
setIsWebViewVisible(false);
|
|
128
|
+
onClose === null || onClose === void 0 || onClose();
|
|
129
|
+
};
|
|
130
|
+
if (enableAnimation) {
|
|
131
|
+
_reactNative.Animated.timing(fadeAnim, {
|
|
132
|
+
toValue: 0,
|
|
133
|
+
duration: 200,
|
|
134
|
+
useNativeDriver: true
|
|
135
|
+
}).start(complete);
|
|
136
|
+
} else {
|
|
137
|
+
fadeAnim.setValue(0);
|
|
138
|
+
requestAnimationFrame(complete);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
const handleMessage = event => {
|
|
142
|
+
const {
|
|
143
|
+
data
|
|
144
|
+
} = event.nativeEvent;
|
|
145
|
+
try {
|
|
146
|
+
const parsedData = JSON.parse(data);
|
|
147
|
+
if (parsedData.type === "APP_READY") {
|
|
148
|
+
console.log("APP_READY", webViewRef.current && isWebViewVisible);
|
|
149
|
+
if (webViewRef.current && isWebViewVisible) {
|
|
150
|
+
webViewRef.current.injectJavaScript(`
|
|
151
|
+
window.postMessage(${JSON.stringify({
|
|
152
|
+
name: "openFrame",
|
|
153
|
+
domain: "app-domain.com"
|
|
154
|
+
})}, '*');
|
|
155
|
+
window.postMessage(${JSON.stringify({
|
|
156
|
+
name: "registerUserId",
|
|
157
|
+
action: "registerUserId",
|
|
158
|
+
domain: "app-domain.com",
|
|
159
|
+
data: {
|
|
160
|
+
userId: `${user_id}`,
|
|
161
|
+
token: `${user_token}`
|
|
162
|
+
}
|
|
163
|
+
})}, '*');
|
|
164
|
+
`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (typeof parsedData !== "object" || !parsedData.type) {
|
|
168
|
+
console.warn("Invalid message structure");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
switch (parsedData.type) {
|
|
172
|
+
case "close_chatbot":
|
|
173
|
+
closeWebView();
|
|
174
|
+
break;
|
|
175
|
+
default:
|
|
176
|
+
if (onMessage) onMessage(parsedData);
|
|
177
|
+
}
|
|
178
|
+
} catch (error) {
|
|
179
|
+
console.error("Failed to parse or process WebView message:", error);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const getScreenDimensions = () => {
|
|
183
|
+
const windowHeight = _reactNative.Dimensions.get("window").height;
|
|
184
|
+
const windowWidth = _reactNative.Dimensions.get("window").width;
|
|
185
|
+
const statusBarHeight = _reactNative.Platform.OS === "ios" ? 0 : _reactNative.StatusBar.currentHeight || 0;
|
|
186
|
+
return {
|
|
187
|
+
height: windowHeight - statusBarHeight,
|
|
188
|
+
width: windowWidth
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
const screenDimensions = getScreenDimensions();
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
193
|
+
style: styles.mainContainer
|
|
194
|
+
}, !loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, show_floating_button && api_key && chatbotConfig && /*#__PURE__*/_react.default.createElement(_FloatingButton.default, {
|
|
195
|
+
onPress: openWebView,
|
|
196
|
+
brandColor: chatbotConfig.brand_color,
|
|
197
|
+
imageUrl: chatbotConfig.image_url
|
|
198
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
199
|
+
style: [styles.webViewWrapper, {
|
|
200
|
+
height: isWebViewVisible ? "100%" : 0
|
|
201
|
+
}],
|
|
202
|
+
pointerEvents: isWebViewVisible ? "auto" : "none"
|
|
203
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
204
|
+
style: [isFullScreen ? styles.fullScreenContainer : styles.inlineContainer, {
|
|
205
|
+
opacity: fadeAnim
|
|
206
|
+
}]
|
|
207
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativeWebview.WebView, {
|
|
208
|
+
ref: webViewRef,
|
|
209
|
+
source: {
|
|
210
|
+
uri: webViewUrl
|
|
211
|
+
},
|
|
212
|
+
onMessage: handleMessage,
|
|
213
|
+
style: styles.webview,
|
|
214
|
+
containerStyle: isFullScreen ? {
|
|
215
|
+
width: screenDimensions.width,
|
|
216
|
+
height: screenDimensions.height
|
|
217
|
+
} : undefined,
|
|
218
|
+
allowsInlineMediaPlayback: true,
|
|
219
|
+
mediaPlaybackRequiresUserAction: false,
|
|
220
|
+
allowFileAccess: false,
|
|
221
|
+
geolocationEnabled: false,
|
|
222
|
+
javaScriptEnabled: true,
|
|
223
|
+
domStorageEnabled: true,
|
|
224
|
+
cacheEnabled: true,
|
|
225
|
+
scrollEnabled: true,
|
|
226
|
+
bounces: false,
|
|
227
|
+
onShouldStartLoadWithRequest: request => {
|
|
228
|
+
return request.url.startsWith(_constants.BASE_CHATBOT_URL);
|
|
229
|
+
},
|
|
230
|
+
startInLoadingState: isFirstLoadRef.current,
|
|
231
|
+
onLoadEnd: () => {
|
|
232
|
+
var _webViewRef$current;
|
|
233
|
+
(_webViewRef$current = webViewRef.current) === null || _webViewRef$current === void 0 || _webViewRef$current.injectJavaScript(`
|
|
234
|
+
if (!document.querySelector('meta[name="viewport"]')) {
|
|
235
|
+
var meta = document.createElement('meta');
|
|
236
|
+
meta.name = 'viewport';
|
|
237
|
+
meta.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no';
|
|
238
|
+
document.getElementsByTagName('head')[0].appendChild(meta);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (!document.querySelector('#injectedStyle')) {
|
|
242
|
+
const style = document.createElement('style');
|
|
243
|
+
style.id = 'injectedStyle';
|
|
244
|
+
style.textContent = \`
|
|
245
|
+
html, body, #root, #__next {
|
|
246
|
+
height: 100% !important;
|
|
247
|
+
min-height: 100% !important;
|
|
248
|
+
overflow: hidden !important;
|
|
249
|
+
}
|
|
250
|
+
\`;
|
|
251
|
+
document.head.appendChild(style);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
window.sendToChatbot = function(message) {
|
|
255
|
+
window.ReactNativeWebView.postMessage(JSON.stringify(message));
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
var closeButton = document.querySelector('.chatbot-close-button');
|
|
259
|
+
if (closeButton) {
|
|
260
|
+
closeButton.addEventListener('click', () => {
|
|
261
|
+
window.sendToChatbot({ type: 'close_chatbot' });
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
true;
|
|
266
|
+
`);
|
|
267
|
+
isFirstLoadRef.current = false;
|
|
268
|
+
},
|
|
269
|
+
onError: syntheticEvent => {
|
|
270
|
+
const {
|
|
271
|
+
nativeEvent
|
|
272
|
+
} = syntheticEvent;
|
|
273
|
+
console.warn("WebView error:", nativeEvent);
|
|
274
|
+
}
|
|
275
|
+
})))));
|
|
276
|
+
};
|
|
277
|
+
const styles = _reactNative.StyleSheet.create({
|
|
278
|
+
mainContainer: {
|
|
279
|
+
flex: 1,
|
|
280
|
+
position: "relative"
|
|
281
|
+
},
|
|
282
|
+
webViewWrapper: {
|
|
283
|
+
position: "absolute",
|
|
284
|
+
top: 0,
|
|
285
|
+
left: 0,
|
|
286
|
+
right: 0,
|
|
287
|
+
bottom: 0,
|
|
288
|
+
overflow: "hidden",
|
|
289
|
+
zIndex: 1000
|
|
290
|
+
},
|
|
291
|
+
fullScreenContainer: {
|
|
292
|
+
position: "absolute",
|
|
293
|
+
top: 0,
|
|
294
|
+
left: 0,
|
|
295
|
+
right: 0,
|
|
296
|
+
bottom: 0,
|
|
297
|
+
backgroundColor: "white",
|
|
298
|
+
zIndex: 1000
|
|
299
|
+
},
|
|
300
|
+
inlineContainer: {
|
|
301
|
+
flex: 1,
|
|
302
|
+
backgroundColor: "white"
|
|
303
|
+
},
|
|
304
|
+
webview: {
|
|
305
|
+
flex: 1,
|
|
306
|
+
backgroundColor: "white"
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
var _default = exports.default = ChatbotSDK;
|
|
310
|
+
//# sourceMappingURL=Chatbotsdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_FloatingButton","_interopRequireDefault","_constants","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ChatbotSDK","api_key","user_id","user_token","additional_params","show_floating_button","onMessage","isFullScreen","enableAnimation","onOpen","onClose","isWebViewVisible","setIsWebViewVisible","useState","chatbotConfig","setChatbotConfig","loading","setLoading","webViewRef","useRef","fadeAnim","Animated","Value","current","isFirstLoadRef","webViewUrl","useMemo","constructUrl","stableAdditionalParams","JSON","stringify","triggerAppInit","injectJavaScript","useEffect","fetchChatbotConfig","_data$user","endpointUrl","payload","client_user_id","org_id","token","extra_info","response","fetch","method","headers","body","ok","Error","data","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","error","console","params","URLSearchParams","id","BASE_CHATBOT_URL","toString","openWebView","timing","toValue","duration","useNativeDriver","start","setTimeout","setValue","requestAnimationFrame","closeWebView","log","postMessage","name","domain","complete","handleMessage","event","nativeEvent","parsedData","parse","type","action","userId","warn","getScreenDimensions","windowHeight","Dimensions","height","windowWidth","width","statusBarHeight","Platform","OS","StatusBar","currentHeight","screenDimensions","createElement","View","style","styles","mainContainer","Fragment","onPress","brandColor","imageUrl","webViewWrapper","pointerEvents","fullScreenContainer","inlineContainer","opacity","WebView","ref","source","uri","webview","containerStyle","undefined","allowsInlineMediaPlayback","mediaPlaybackRequiresUserAction","allowFileAccess","geolocationEnabled","javaScriptEnabled","domStorageEnabled","cacheEnabled","scrollEnabled","bounces","onShouldStartLoadWithRequest","request","url","startsWith","startInLoadingState","onLoadEnd","_webViewRef$current","onError","syntheticEvent","StyleSheet","create","flex","position","top","left","right","bottom","overflow","zIndex","backgroundColor","_default","exports"],"sourceRoot":"../../src","sources":["Chatbotsdk.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAA+C,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,O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 -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const FloatingButton = ({
|
|
11
|
+
onPress,
|
|
12
|
+
brandColor = "#007AFF",
|
|
13
|
+
// Default color
|
|
14
|
+
imageUrl
|
|
15
|
+
}) => {
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
17
|
+
style: [styles.button, {
|
|
18
|
+
backgroundColor: brandColor
|
|
19
|
+
}],
|
|
20
|
+
onPress: onPress
|
|
21
|
+
}, imageUrl ? /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
22
|
+
source: {
|
|
23
|
+
uri: imageUrl
|
|
24
|
+
},
|
|
25
|
+
style: styles.buttonImage
|
|
26
|
+
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
27
|
+
style: styles.buttonText
|
|
28
|
+
}, "Chat"));
|
|
29
|
+
};
|
|
30
|
+
const styles = _reactNative.StyleSheet.create({
|
|
31
|
+
button: {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
bottom: 20,
|
|
34
|
+
right: 20,
|
|
35
|
+
borderRadius: 30,
|
|
36
|
+
width: 60,
|
|
37
|
+
height: 60,
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
elevation: 5,
|
|
41
|
+
shadowColor: "#000",
|
|
42
|
+
shadowOffset: {
|
|
43
|
+
width: 0,
|
|
44
|
+
height: 2
|
|
45
|
+
},
|
|
46
|
+
shadowOpacity: 0.25,
|
|
47
|
+
shadowRadius: 3.84
|
|
48
|
+
},
|
|
49
|
+
buttonText: {
|
|
50
|
+
color: "white",
|
|
51
|
+
fontSize: 16,
|
|
52
|
+
fontWeight: "bold"
|
|
53
|
+
},
|
|
54
|
+
buttonImage: {
|
|
55
|
+
width: 40,
|
|
56
|
+
height: 40,
|
|
57
|
+
borderRadius: 20
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var _default = exports.default = FloatingButton;
|
|
61
|
+
//# sourceMappingURL=FloatingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","FloatingButton","onPress","brandColor","imageUrl","createElement","TouchableOpacity","style","styles","button","backgroundColor","Image","source","uri","buttonImage","Text","buttonText","StyleSheet","create","position","bottom","right","borderRadius","width","height","justifyContent","alignItems","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","color","fontSize","fontWeight","_default","exports"],"sourceRoot":"../../src","sources":["FloatingButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAyE,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQzE,MAAMG,cAA6C,GAAGA,CAAC;EACrDC,OAAO;EACPC,UAAU,GAAG,SAAS;EAAE;EACxBC;AACF,CAAC,KAAK;EACJ,oBACEV,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,YAAA,CAAAS,gBAAgB;IACfC,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;MAAEC,eAAe,EAAEP;IAAW,CAAC,CAAE;IACxDD,OAAO,EAAEA;EAAQ,GAEhBE,QAAQ,gBACPV,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,YAAA,CAAAc,KAAK;IAACC,MAAM,EAAE;MAAEC,GAAG,EAAET;IAAS,CAAE;IAACG,KAAK,EAAEC,MAAM,CAACM;EAAY,CAAE,CAAC,gBAE/DpB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,YAAA,CAAAkB,IAAI;IAACR,KAAK,EAAEC,MAAM,CAACQ;EAAW,GAAC,MAAU,CAE5B,CAAC;AAEvB,CAAC;AAED,MAAMR,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,MAAM,EAAE;IACNU,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,YAAY,EAAE,EAAE;IAChBC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEN,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCM,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDf,UAAU,EAAE;IACVgB,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDpB,WAAW,EAAE;IACXS,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVF,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAEYC,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const LoadingIndicator = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
11
|
+
style: {
|
|
12
|
+
flex: 1,
|
|
13
|
+
justifyContent: "center",
|
|
14
|
+
alignItems: "center"
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
|
|
17
|
+
size: "large",
|
|
18
|
+
color: "#0000ff"
|
|
19
|
+
}));
|
|
20
|
+
var _default = exports.default = LoadingIndicator;
|
|
21
|
+
//# sourceMappingURL=LoadingIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","LoadingIndicator","createElement","View","style","flex","justifyContent","alignItems","ActivityIndicator","size","color","_default","exports"],"sourceRoot":"../../src","sources":["LoadingIndicator.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAuD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGvD,MAAMG,gBAA0B,GAAGA,CAAA,kBACjCP,MAAA,CAAAM,OAAA,CAAAE,aAAA,CAACL,YAAA,CAAAM,IAAI;EAACC,KAAK,EAAE;IAAEC,IAAI,EAAE,CAAC;IAAEC,cAAc,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAS;AAAE,gBACvEb,MAAA,CAAAM,OAAA,CAAAE,aAAA,CAACL,YAAA,CAAAW,iBAAiB;EAACC,IAAI,EAAC,OAAO;EAACC,KAAK,EAAC;AAAS,CAAE,CAC7C,CACP;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEaC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.config = void 0;
|
|
7
|
+
const config = exports.config = {
|
|
8
|
+
API_URL: process.env.API_URL || 'https://api.robylon.com',
|
|
9
|
+
DEBUG: process.env.DEBUG === 'true'
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["config","exports","API_URL","process","env","DEBUG"],"sourceRoot":"../../src","sources":["config.ts"],"mappings":";;;;;;AAAO,MAAMA,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,OAAO,EAAEC,OAAO,CAACC,GAAG,CAACF,OAAO,IAAI,yBAAyB;EACzDG,KAAK,EAAEF,OAAO,CAACC,GAAG,CAACC,KAAK,KAAK;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BASE_CHATBOT_URL = void 0;
|
|
7
|
+
const BASE_CHATBOT_DOMAIN = process.env.CHATBOT_DOMAIN || "";
|
|
8
|
+
const CHATBOT_PATH = process.env.CHATBOT_PATH || "";
|
|
9
|
+
const BASE_CHATBOT_URL = exports.BASE_CHATBOT_URL = `${BASE_CHATBOT_DOMAIN}/${CHATBOT_PATH}`;
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BASE_CHATBOT_DOMAIN","process","env","CHATBOT_DOMAIN","CHATBOT_PATH","BASE_CHATBOT_URL","exports"],"sourceRoot":"../../src","sources":["constants.ts"],"mappings":";;;;;;AAAA,MAAMA,mBAAmB,GAAGC,OAAO,CAACC,GAAG,CAACC,cAAc,IAAI,EAAE;AAC5D,MAAMC,YAAY,GAAGH,OAAO,CAACC,GAAG,CAACE,YAAY,IAAI,EAAE;AAC5C,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,GAAGL,mBAAmB,IAAII,YAAY,EAAE","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["global.d.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ChatbotSDK", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Chatbotsdk.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "openChatbot", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _openChatbot.openChatbot;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _Chatbotsdk = _interopRequireDefault(require("./Chatbotsdk"));
|
|
19
|
+
var _openChatbot = require("./openChatbot");
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_Chatbotsdk","_interopRequireDefault","require","_openChatbot","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA4C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.openChatbot = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
const openChatbot = (chatbotId, additionalParams = {}) => {
|
|
10
|
+
const params = new URLSearchParams({
|
|
11
|
+
id: chatbotId,
|
|
12
|
+
...additionalParams
|
|
13
|
+
});
|
|
14
|
+
const url = `${_constants.BASE_CHATBOT_URL}?${params.toString()}`;
|
|
15
|
+
_reactNative.Linking.openURL(url);
|
|
16
|
+
};
|
|
17
|
+
exports.openChatbot = openChatbot;
|
|
18
|
+
//# sourceMappingURL=openChatbot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_constants","openChatbot","chatbotId","additionalParams","params","URLSearchParams","id","url","BASE_CHATBOT_URL","toString","Linking","openURL","exports"],"sourceRoot":"../../src","sources":["openChatbot.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEO,MAAME,WAAW,GAAGA,CACzBC,SAAiB,EACjBC,gBAAwC,GAAG,CAAC,CAAC,KACpC;EACT,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;IAAEC,EAAE,EAAEJ,SAAS;IAAE,GAAGC;EAAiB,CAAC,CAAC;EAC1E,MAAMI,GAAG,GAAG,GAAGC,2BAAgB,IAAIJ,MAAM,CAACK,QAAQ,CAAC,CAAC,EAAE;EACtDC,oBAAO,CAACC,OAAO,CAACJ,GAAG,CAAC;AACtB,CAAC;AAACK,OAAA,CAAAX,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// File: src/ChatbotWebview.tsx
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { WebView } from "react-native-webview";
|
|
5
|
+
import { BASE_CHATBOT_URL } from "./constants";
|
|
6
|
+
import LoadingIndicator from "./LoadingIndicator";
|
|
7
|
+
const constructUrl = (chatbotId, additionalParams = {}) => {
|
|
8
|
+
const params = new URLSearchParams({
|
|
9
|
+
id: chatbotId,
|
|
10
|
+
...additionalParams
|
|
11
|
+
});
|
|
12
|
+
return `${BASE_CHATBOT_URL}?${params.toString()}`;
|
|
13
|
+
};
|
|
14
|
+
export const ChatbotWebview = ({
|
|
15
|
+
chatbotId,
|
|
16
|
+
additionalParams
|
|
17
|
+
}) => {
|
|
18
|
+
const [url, setUrl] = useState("");
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setUrl(constructUrl(chatbotId, additionalParams));
|
|
21
|
+
}, [chatbotId, additionalParams]);
|
|
22
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
23
|
+
style: {
|
|
24
|
+
flex: 1
|
|
25
|
+
}
|
|
26
|
+
}, url ? /*#__PURE__*/React.createElement(WebView, {
|
|
27
|
+
source: {
|
|
28
|
+
uri: url
|
|
29
|
+
},
|
|
30
|
+
startInLoadingState: true,
|
|
31
|
+
renderLoading: () => /*#__PURE__*/React.createElement(LoadingIndicator, null)
|
|
32
|
+
}) : /*#__PURE__*/React.createElement(LoadingIndicator, null));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ChatbotWebview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","View","WebView","BASE_CHATBOT_URL","LoadingIndicator","constructUrl","chatbotId","additionalParams","params","URLSearchParams","id","toString","ChatbotWebview","url","setUrl","createElement","style","flex","source","uri","startInLoadingState","renderLoading"],"sourceRoot":"../../src","sources":["ChatbotWebview.tsx"],"mappings":"AAAA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,gBAAgB,QAAQ,aAAa;AAC9C,OAAOC,gBAAgB,MAAM,oBAAoB;AAOjD,MAAMC,YAAY,GAAGA,CACnBC,SAAiB,EACjBC,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