bibot 1.0.66 → 1.0.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -4232,6 +4232,12 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
4232
4232
|
handlePredefinedQuestionSelect = _useBiBotChatBot.handlePredefinedQuestionSelect;
|
4233
4233
|
var isOnline = useOnlineStatus();
|
4234
4234
|
var greeting = chatBubbleConfig !== null && chatBubbleConfig !== void 0 && chatBubbleConfig.knownUser ? "Hi, " + chatBubbleConfig.knownUser + "! How can I help you today?" : 'Hello! How can I help you today?';
|
4235
|
+
var _React$useState = React.useState(true),
|
4236
|
+
isGreetingVisible = _React$useState[0],
|
4237
|
+
setGreetingVisible = _React$useState[1];
|
4238
|
+
var handleCloseGreeting = function handleCloseGreeting() {
|
4239
|
+
setGreetingVisible(false);
|
4240
|
+
};
|
4235
4241
|
return React.createElement("div", {
|
4236
4242
|
className: "chat-bubble " + (chatIsOpen ? 'open' : ''),
|
4237
4243
|
style: {
|
@@ -4478,7 +4484,7 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
4478
4484
|
alignItems: 'center',
|
4479
4485
|
padding: '0 10px'
|
4480
4486
|
}
|
4481
|
-
}, React.createElement("span", {
|
4487
|
+
}, isGreetingVisible && React.createElement("span", {
|
4482
4488
|
style: {
|
4483
4489
|
fontSize: '12px',
|
4484
4490
|
color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
|
@@ -4491,9 +4497,22 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
|
|
4491
4497
|
borderTopLeftRadius: 10,
|
4492
4498
|
borderBottomLeftRadius: 10,
|
4493
4499
|
marginBottom: 60,
|
4494
|
-
boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)'
|
4500
|
+
boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)',
|
4501
|
+
position: 'relative'
|
4502
|
+
}
|
4503
|
+
}, greeting, React.createElement("button", {
|
4504
|
+
onClick: handleCloseGreeting,
|
4505
|
+
style: {
|
4506
|
+
position: 'absolute',
|
4507
|
+
top: '2px',
|
4508
|
+
left: '-1px',
|
4509
|
+
background: 'transparent',
|
4510
|
+
border: 'none',
|
4511
|
+
cursor: 'pointer',
|
4512
|
+
color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
|
4513
|
+
fontSize: '14px'
|
4495
4514
|
}
|
4496
|
-
},
|
4515
|
+
}, "\xD7")), React.createElement("button", {
|
4497
4516
|
onClick: toggleChat,
|
4498
4517
|
className: styles['chat-toggle'],
|
4499
4518
|
style: {
|