bibot 1.0.31 → 1.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/component/bibot.d.ts +3 -1
- package/dist/hooks/useBiBotChatBot.d.ts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +28 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +28 -19
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -3627,7 +3627,7 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3627
3627
|
return Promise.resolve(askBiBot({
|
3628
3628
|
client_id: clientId,
|
3629
3629
|
q: input,
|
3630
|
-
session_id: state.sessionId,
|
3630
|
+
session_id: client_session_id ? client_session_id : state.sessionId,
|
3631
3631
|
chat_id: v4()
|
3632
3632
|
})).then(function (response) {
|
3633
3633
|
setMessages(function (messages) {
|
@@ -3680,7 +3680,8 @@ var useBiBotChatBot = function useBiBotChatBot(_ref) {
|
|
3680
3680
|
return Promise.reject(e);
|
3681
3681
|
}
|
3682
3682
|
};
|
3683
|
-
var clientId = _ref.clientId
|
3683
|
+
var clientId = _ref.clientId,
|
3684
|
+
client_session_id = _ref.client_session_id;
|
3684
3685
|
var _useState = useState([]),
|
3685
3686
|
predefinedQuestions = _useState[0],
|
3686
3687
|
setPredefinedQuestions = _useState[1];
|
@@ -4079,7 +4080,8 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4079
4080
|
color: '#000',
|
4080
4081
|
backgroundColor: '#fff',
|
4081
4082
|
padding: 10,
|
4082
|
-
borderRadius: '6px'
|
4083
|
+
borderRadius: '6px',
|
4084
|
+
marginBottom: '20px'
|
4083
4085
|
}
|
4084
4086
|
}, createElement("div", {
|
4085
4087
|
style: {
|
@@ -4100,8 +4102,7 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4100
4102
|
}
|
4101
4103
|
}, "Welcome!"), createElement("p", {
|
4102
4104
|
style: {
|
4103
|
-
fontSize: '14px'
|
4104
|
-
fontWeight: 'bold'
|
4105
|
+
fontSize: '14px'
|
4105
4106
|
}
|
4106
4107
|
}, "Are you looking for answers to any of these questions? Click for an answer ")), questions.map(function (question, index) {
|
4107
4108
|
var _chatBubbleConfig$col;
|
@@ -4128,9 +4129,13 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
|
|
4128
4129
|
};
|
4129
4130
|
var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
4130
4131
|
var _chatBubbleConfig$col2, _chatBubbleConfig$col3;
|
4131
|
-
var clientId = _ref2.clientId
|
4132
|
+
var clientId = _ref2.clientId,
|
4133
|
+
client_session_id = _ref2.client_session_id,
|
4134
|
+
redirect_notice = _ref2.redirect_notice;
|
4132
4135
|
var _useBiBotChatBot2 = useBiBotChatBot({
|
4133
|
-
clientId: clientId
|
4136
|
+
clientId: clientId,
|
4137
|
+
client_session_id: client_session_id,
|
4138
|
+
redirect_notice: redirect_notice
|
4134
4139
|
}),
|
4135
4140
|
chatIsOpen = _useBiBotChatBot2.chatIsOpen,
|
4136
4141
|
messages = _useBiBotChatBot2.messages,
|
@@ -4157,7 +4162,7 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
|
4157
4162
|
}, chatIsOpen && createElement("div", {
|
4158
4163
|
className: styles['chat-window'],
|
4159
4164
|
style: {
|
4160
|
-
backgroundColor: '#
|
4165
|
+
backgroundColor: '#fff',
|
4161
4166
|
position: 'absolute',
|
4162
4167
|
bottom: '60px',
|
4163
4168
|
right: '25px',
|
@@ -4166,7 +4171,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
|
4166
4171
|
borderRadius: 10,
|
4167
4172
|
display: 'flex',
|
4168
4173
|
flexDirection: 'column',
|
4169
|
-
justifyContent: 'space-between'
|
4174
|
+
justifyContent: 'space-between',
|
4175
|
+
border: "0.5px solid " + (chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color)
|
4170
4176
|
}
|
4171
4177
|
}, createElement("div", {
|
4172
4178
|
className: styles['chat-header'],
|
@@ -4228,7 +4234,11 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
|
4228
4234
|
flexGrow: 1,
|
4229
4235
|
flexDirection: 'column'
|
4230
4236
|
}
|
4231
|
-
},
|
4237
|
+
}, showPredefinedQuestions && predefinedQuestions && predefinedQuestions.length > 0 && createElement(PredefinedQuestions, {
|
4238
|
+
questions: predefinedQuestions.slice(0, 3),
|
4239
|
+
onSelect: handlePredefinedQuestionSelect,
|
4240
|
+
clientId: clientId
|
4241
|
+
}), messages.map(function (message, index) {
|
4232
4242
|
return message.sender === 'user' ? createElement("div", {
|
4233
4243
|
key: index,
|
4234
4244
|
className: "message " + message.sender,
|
@@ -4272,22 +4282,18 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
|
4272
4282
|
marginLeft: '20px'
|
4273
4283
|
},
|
4274
4284
|
className: 'message'
|
4275
|
-
}, ' ', createElement(Loader, null)),
|
4276
|
-
questions: predefinedQuestions.slice(0, 3),
|
4277
|
-
onSelect: handlePredefinedQuestionSelect,
|
4278
|
-
clientId: clientId
|
4279
|
-
}), createElement("div", {
|
4285
|
+
}, ' ', createElement(Loader, null)), createElement("div", {
|
4280
4286
|
ref: messageEndRef
|
4281
4287
|
})), createElement("div", {
|
4282
4288
|
className: styles['input-area'],
|
4283
4289
|
style: {
|
4284
4290
|
display: 'flex',
|
4285
4291
|
alignItems: 'center',
|
4286
|
-
borderTop: '1px solid #
|
4292
|
+
borderTop: '1px solid #d7d7d7',
|
4287
4293
|
padding: 10,
|
4288
4294
|
borderBottomLeftRadius: 8,
|
4289
4295
|
borderBottomRightRadius: 8,
|
4290
|
-
backgroundColor: '#
|
4296
|
+
backgroundColor: '#fff'
|
4291
4297
|
}
|
4292
4298
|
}, createElement("input", {
|
4293
4299
|
style: {
|
@@ -4337,9 +4343,12 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(_ref2) {
|
|
4337
4343
|
};
|
4338
4344
|
|
4339
4345
|
var BiBot = function BiBot(_ref) {
|
4340
|
-
var clientId = _ref.clientId
|
4346
|
+
var clientId = _ref.clientId,
|
4347
|
+
client_session_id = _ref.client_session_id;
|
4341
4348
|
return createElement(AppProvider, null, createElement(ChatBubbleBiBot, {
|
4342
|
-
clientId: clientId
|
4349
|
+
clientId: clientId,
|
4350
|
+
client_session_id: client_session_id,
|
4351
|
+
redirect_notice: false
|
4343
4352
|
}));
|
4344
4353
|
};
|
4345
4354
|
|