bibot 1.0.34 → 1.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +20 -25
- package/dist/index.js +30 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/services/plugin-api.d.ts +6 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -3573,6 +3573,22 @@ var askBiBot = function askBiBot(data) {
|
|
3573
3573
|
return Promise.reject(e);
|
3574
3574
|
}
|
3575
3575
|
};
|
3576
|
+
var recordPredefinedQ = function recordPredefinedQ(data) {
|
3577
|
+
try {
|
3578
|
+
return Promise.resolve(_catch(function () {
|
3579
|
+
var path = 'https://training.dev.bibot.thespuka.com/v0/training/predefined-questions-statistics';
|
3580
|
+
return Promise.resolve(pluginAxiosInstance.post(path, data)).then(function (response) {
|
3581
|
+
console.log(response, 'here is the res');
|
3582
|
+
return response.data;
|
3583
|
+
});
|
3584
|
+
}, function (error) {
|
3585
|
+
console.log(error.message);
|
3586
|
+
return error.message;
|
3587
|
+
}));
|
3588
|
+
} catch (e) {
|
3589
|
+
return Promise.reject(e);
|
3590
|
+
}
|
3591
|
+
};
|
3576
3592
|
var askTimedOutBiBot = function askTimedOutBiBot(data) {
|
3577
3593
|
try {
|
3578
3594
|
return Promise.resolve(_catch(function () {
|
@@ -3637,10 +3653,15 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3637
3653
|
return Promise.reject(e);
|
3638
3654
|
}
|
3639
3655
|
};
|
3640
|
-
var askPredefinedQuestion = function askPredefinedQuestion(question) {
|
3656
|
+
var askPredefinedQuestion = function askPredefinedQuestion(question, client_id) {
|
3641
3657
|
try {
|
3642
3658
|
setIsLoading(true);
|
3643
3659
|
var input = question.question.trim();
|
3660
|
+
recordPredefinedQ({
|
3661
|
+
client_id: clientId,
|
3662
|
+
question: question.question
|
3663
|
+
});
|
3664
|
+
console.log(question.question, client_id);
|
3644
3665
|
setUserInput('');
|
3645
3666
|
if (input === question.question) {
|
3646
3667
|
setMessages(function (messages) {
|
@@ -3692,7 +3713,7 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3692
3713
|
setChatBubbleConfig = _useState7[1];
|
3693
3714
|
var handlePredefinedQuestionSelect = function handlePredefinedQuestionSelect(question) {
|
3694
3715
|
sendInputInquiry();
|
3695
|
-
askPredefinedQuestion(question);
|
3716
|
+
askPredefinedQuestion(question, clientId);
|
3696
3717
|
setUserInput('');
|
3697
3718
|
setShowPredefinedQuestions(false);
|
3698
3719
|
};
|
@@ -3762,7 +3783,7 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3762
3783
|
};
|
3763
3784
|
};
|
3764
3785
|
|
3765
|
-
var styles = {
|
3786
|
+
var styles = {};
|
3766
3787
|
|
3767
3788
|
function SendMessageIcon(_ref) {
|
3768
3789
|
var color = _ref.color;
|
@@ -4095,14 +4116,15 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4095
4116
|
style: {
|
4096
4117
|
backgroundColor: '#fff',
|
4097
4118
|
border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
|
4098
|
-
fontSize:
|
4099
|
-
margin:
|
4119
|
+
fontSize: '16px',
|
4120
|
+
margin: '5px',
|
4100
4121
|
textAlign: 'start',
|
4101
|
-
|
4102
|
-
|
4122
|
+
maxHeight: '40px',
|
4123
|
+
overflow: 'hidden',
|
4124
|
+
padding: '10px',
|
4103
4125
|
display: 'flex',
|
4104
4126
|
alignItems: 'center',
|
4105
|
-
borderRadius:
|
4127
|
+
borderRadius: '6px',
|
4106
4128
|
cursor: 'pointer'
|
4107
4129
|
},
|
4108
4130
|
onClick: function onClick() {
|