bibot 1.0.54 → 1.0.56
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/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3286,7 +3286,11 @@ var createPluginAxiosInstance = function createPluginAxiosInstance(baseURL, para
|
|
|
3286
3286
|
try {
|
|
3287
3287
|
var errMsg = 'An unknown error occurred';
|
|
3288
3288
|
if (error.response) {
|
|
3289
|
-
|
|
3289
|
+
if (error.response.status === 504) {
|
|
3290
|
+
errMsg = 'Timeout error occurred';
|
|
3291
|
+
} else {
|
|
3292
|
+
errMsg = error.response.data.message || error.response.statusText;
|
|
3293
|
+
}
|
|
3290
3294
|
} else if (error.request) {
|
|
3291
3295
|
errMsg = 'No response received from the server.';
|
|
3292
3296
|
} else {
|
|
@@ -3595,7 +3599,7 @@ var askBiBot = function askBiBot(pluginAxiosInstance, data) {
|
|
|
3595
3599
|
}
|
|
3596
3600
|
});
|
|
3597
3601
|
}, function (error) {
|
|
3598
|
-
if (error.
|
|
3602
|
+
if (error.message === timeoutMessage) {
|
|
3599
3603
|
return Promise.resolve(handleRetries(pluginAxiosInstance, data, 1));
|
|
3600
3604
|
} else {
|
|
3601
3605
|
return {
|
|
@@ -3615,7 +3619,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
|
|
|
3615
3619
|
return response.data;
|
|
3616
3620
|
});
|
|
3617
3621
|
}, function (error) {
|
|
3618
|
-
if (error.
|
|
3622
|
+
if (error.message === timeoutMessage) {
|
|
3619
3623
|
return {
|
|
3620
3624
|
message: defaultSlacker
|
|
3621
3625
|
};
|
|
@@ -3630,6 +3634,7 @@ var askTimedOutBiBot = function askTimedOutBiBot(pluginAxiosInstance, data) {
|
|
|
3630
3634
|
}
|
|
3631
3635
|
};
|
|
3632
3636
|
var defaultSlacker = "BiBot_Retry_Later";
|
|
3637
|
+
var timeoutMessage = 'Timeout error occurred';
|
|
3633
3638
|
|
|
3634
3639
|
var useBiBotChatBot = function useBiBotChatBot(bibotProps) {
|
|
3635
3640
|
var sendInputInquiry = function sendInputInquiry() {
|
|
@@ -4226,8 +4231,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4226
4231
|
position: 'absolute',
|
|
4227
4232
|
bottom: '60px',
|
|
4228
4233
|
right: '25px',
|
|
4229
|
-
width:
|
|
4230
|
-
height:
|
|
4234
|
+
width: 370,
|
|
4235
|
+
height: 550,
|
|
4231
4236
|
borderRadius: 10,
|
|
4232
4237
|
display: 'flex',
|
|
4233
4238
|
flexDirection: 'column',
|
|
@@ -4355,8 +4360,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4355
4360
|
alignItems: 'center',
|
|
4356
4361
|
borderTop: '1px solid #d7d7d7',
|
|
4357
4362
|
padding: 10,
|
|
4358
|
-
borderBottomLeftRadius:
|
|
4359
|
-
borderBottomRightRadius:
|
|
4363
|
+
borderBottomLeftRadius: 10,
|
|
4364
|
+
borderBottomRightRadius: 10,
|
|
4360
4365
|
backgroundColor: '#fff'
|
|
4361
4366
|
}
|
|
4362
4367
|
}, React.createElement("input", {
|
|
@@ -4399,8 +4404,14 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
|
4399
4404
|
fontSize: '12px',
|
|
4400
4405
|
color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
|
|
4401
4406
|
textAlign: 'left',
|
|
4402
|
-
marginRight: '
|
|
4403
|
-
whiteSpace: 'nowrap'
|
|
4407
|
+
marginRight: '5px',
|
|
4408
|
+
whiteSpace: 'nowrap',
|
|
4409
|
+
backgroundColor: '#fff',
|
|
4410
|
+
padding: 15,
|
|
4411
|
+
borderTopRightRadius: 30,
|
|
4412
|
+
borderTopLeftRadius: 10,
|
|
4413
|
+
borderBottomLeftRadius: 10,
|
|
4414
|
+
marginBottom: 50
|
|
4404
4415
|
}
|
|
4405
4416
|
}, greeting), React.createElement("button", {
|
|
4406
4417
|
onClick: toggleChat,
|