bibot 1.0.66 → 1.0.68

Sign up to get free protection for your applications and to get access to all the features.
@@ -4114,12 +4114,12 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
4114
4114
  chatBubbleConfig = _ref.chatBubbleConfig;
4115
4115
  return createElement("div", {
4116
4116
  style: {
4117
- height: '100%',
4117
+ height: '100dvh',
4118
4118
  color: '#000',
4119
- backgroundColor: '#fff',
4119
+ backgroundColor: 'transparent',
4120
4120
  padding: 10,
4121
4121
  borderRadius: '6px',
4122
- marginBottom: '20px'
4122
+ marginBottom: '100px'
4123
4123
  }
4124
4124
  }, createElement("div", {
4125
4125
  style: {
@@ -4229,6 +4229,12 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4229
4229
  handlePredefinedQuestionSelect = _useBiBotChatBot.handlePredefinedQuestionSelect;
4230
4230
  var isOnline = useOnlineStatus();
4231
4231
  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?';
4232
+ var _React$useState = useState(true),
4233
+ isGreetingVisible = _React$useState[0],
4234
+ setGreetingVisible = _React$useState[1];
4235
+ var handleCloseGreeting = function handleCloseGreeting() {
4236
+ setGreetingVisible(false);
4237
+ };
4232
4238
  return createElement("div", {
4233
4239
  className: "chat-bubble " + (chatIsOpen ? 'open' : ''),
4234
4240
  style: {
@@ -4475,7 +4481,7 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4475
4481
  alignItems: 'center',
4476
4482
  padding: '0 10px'
4477
4483
  }
4478
- }, createElement("span", {
4484
+ }, isGreetingVisible && createElement("span", {
4479
4485
  style: {
4480
4486
  fontSize: '12px',
4481
4487
  color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
@@ -4488,9 +4494,22 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4488
4494
  borderTopLeftRadius: 10,
4489
4495
  borderBottomLeftRadius: 10,
4490
4496
  marginBottom: 60,
4491
- boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)'
4497
+ boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)',
4498
+ position: 'relative'
4499
+ }
4500
+ }, greeting, createElement("button", {
4501
+ onClick: handleCloseGreeting,
4502
+ style: {
4503
+ position: 'absolute',
4504
+ top: '2px',
4505
+ left: '-1px',
4506
+ background: 'transparent',
4507
+ border: 'none',
4508
+ cursor: 'pointer',
4509
+ color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4510
+ fontSize: '14px'
4492
4511
  }
4493
- }, greeting), createElement("button", {
4512
+ }, "\xD7")), createElement("button", {
4494
4513
  onClick: toggleChat,
4495
4514
  className: styles['chat-toggle'],
4496
4515
  style: {