bibot 1.0.55 → 1.0.57

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 CHANGED
@@ -3827,12 +3827,12 @@ function SendMessageIcon(_ref) {
3827
3827
  return React__default.createElement("svg", {
3828
3828
  xmlns: 'http://www.w3.org/2000/svg',
3829
3829
  className: 'icon icon-tabler icon-tabler-send-2',
3830
- width: '24',
3831
- height: '24',
3830
+ width: '36',
3831
+ height: '36',
3832
3832
  viewBox: '0 0 24 24',
3833
3833
  strokeWidth: '1.5',
3834
3834
  stroke: color,
3835
- fill: 'none',
3835
+ fill: '#d7d7d7',
3836
3836
  strokeLinecap: 'round',
3837
3837
  strokeLinejoin: 'round'
3838
3838
  }, React__default.createElement("path", {
@@ -4129,16 +4129,7 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
4129
4129
  flexDirection: 'column',
4130
4130
  textAlign: 'center'
4131
4131
  }
4132
- }, React.createElement(Avatar, {
4133
- borderColor: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4134
- width: '40px',
4135
- height: '40px',
4136
- source: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.logo_url
4137
- }), React.createElement("h5", {
4138
- style: {
4139
- marginBlock: '0.5px'
4140
- }
4141
- }, chatBubbleConfig !== null && chatBubbleConfig !== void 0 && chatBubbleConfig.knownUser ? "Hello " + chatBubbleConfig.knownUser : 'Welcome!'), React.createElement("p", {
4132
+ }, React.createElement("p", {
4142
4133
  style: {
4143
4134
  fontSize: '14px'
4144
4135
  }
@@ -4147,13 +4138,13 @@ var PredefinedQuestions = function PredefinedQuestions(_ref) {
4147
4138
  return React.createElement("div", {
4148
4139
  key: index,
4149
4140
  style: {
4150
- backgroundColor: 'transparent',
4151
- border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
4141
+ backgroundColor: '#fafafa',
4142
+ border: "0.3px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
4152
4143
  fontSize: '16px',
4153
4144
  margin: '7px',
4154
4145
  textAlign: 'start',
4155
- padding: '10px',
4156
- borderRadius: '6px',
4146
+ padding: '14px',
4147
+ borderRadius: '50px',
4157
4148
  cursor: 'pointer'
4158
4149
  },
4159
4150
  onClick: function onClick() {
@@ -4181,13 +4172,13 @@ var AiFollowUps = function AiFollowUps(_ref) {
4181
4172
  return React.createElement("div", {
4182
4173
  key: index,
4183
4174
  style: {
4184
- backgroundColor: 'transparent',
4185
- border: "0.5px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
4175
+ backgroundColor: '#fafafa',
4176
+ border: "0.3px solid " + (chatBubbleConfig ? (_chatBubbleConfig$col = chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color) != null ? _chatBubbleConfig$col : '#dedede' : '#000'),
4186
4177
  fontSize: '16px',
4187
4178
  margin: '7px',
4188
4179
  textAlign: 'start',
4189
- padding: '10px',
4190
- borderRadius: '6px',
4180
+ padding: '14px',
4181
+ borderRadius: '50px',
4191
4182
  cursor: 'pointer'
4192
4183
  },
4193
4184
  onClick: function onClick() {
@@ -4231,13 +4222,13 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4231
4222
  position: 'absolute',
4232
4223
  bottom: '60px',
4233
4224
  right: '25px',
4234
- width: 350,
4235
- height: 500,
4225
+ width: 370,
4226
+ height: 550,
4236
4227
  borderRadius: 10,
4237
4228
  display: 'flex',
4238
4229
  flexDirection: 'column',
4239
4230
  justifyContent: 'space-between',
4240
- border: "0.5px solid " + (chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color)
4231
+ boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)'
4241
4232
  }
4242
4233
  }, React.createElement("div", {
4243
4234
  className: styles['chat-header'],
@@ -4250,7 +4241,7 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4250
4241
  alignItems: 'center',
4251
4242
  justifyContent: 'flex-start',
4252
4243
  paddingInline: 15,
4253
- paddingBlock: 10
4244
+ paddingBlock: 25
4254
4245
  }
4255
4246
  }, React.createElement("div", {
4256
4247
  style: {
@@ -4260,10 +4251,10 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4260
4251
  fontWeight: 'bold'
4261
4252
  }
4262
4253
  }, React.createElement(Avatar, {
4263
- borderColor: isLoading ? '#fff' : chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4254
+ borderColor: 'transparent',
4264
4255
  indicator: isOnline ? 'green' : '#dedede',
4265
- width: '40px',
4266
- height: '40px',
4256
+ width: '70px',
4257
+ height: '70px',
4267
4258
  source: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.logo_url
4268
4259
  })), React.createElement("div", {
4269
4260
  style: {
@@ -4281,13 +4272,11 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4281
4272
  }
4282
4273
  }, chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.title), isLoading ? React.createElement("span", {
4283
4274
  style: {
4284
- fontSize: '12px',
4285
- lineHeight: '0.9'
4275
+ fontSize: '12px'
4286
4276
  }
4287
4277
  }, "Typing...") : React.createElement("span", {
4288
4278
  style: {
4289
- fontSize: '12px',
4290
- lineHeight: '0.9'
4279
+ fontSize: '12px'
4291
4280
  }
4292
4281
  }, isOnline ? 'Online' : 'Offline'))), React.createElement("div", {
4293
4282
  className: styles['message-list'],
@@ -4321,14 +4310,24 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4321
4310
  }, message.text) : React.createElement("div", {
4322
4311
  key: index,
4323
4312
  style: {
4324
- display: 'flex'
4313
+ display: 'flex',
4314
+ flexDirection: 'column'
4315
+ }
4316
+ }, React.createElement("div", {
4317
+ style: {
4318
+ display: 'flex',
4319
+ alignItems: 'center'
4325
4320
  }
4326
- }, React.createElement(Avatar, {
4327
- borderColor: isLoading ? '#fff' : chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4321
+ }, " ", React.createElement(Avatar, {
4322
+ borderColor: '#fff',
4328
4323
  width: '20px',
4329
4324
  height: '20px',
4330
4325
  source: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.logo_url
4331
- }), React.createElement("div", {
4326
+ }), React.createElement("small", {
4327
+ style: {
4328
+ marginLeft: 10
4329
+ }
4330
+ }, " ", chatBubbleConfig.title, " ")), React.createElement("div", {
4332
4331
  className: "message " + message.sender,
4333
4332
  style: {
4334
4333
  marginBottom: 10,
@@ -4339,7 +4338,8 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4339
4338
  fontSize: '15px',
4340
4339
  backgroundColor: '#f0f0f0',
4341
4340
  color: '#000',
4342
- textAlign: 'left'
4341
+ textAlign: 'left',
4342
+ marginTop: 5
4343
4343
  }
4344
4344
  }, message.text));
4345
4345
  }), aiFollowUpQs && !isLoading && React.createElement(AiFollowUps, {
@@ -4360,8 +4360,6 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4360
4360
  alignItems: 'center',
4361
4361
  borderTop: '1px solid #d7d7d7',
4362
4362
  padding: 10,
4363
- borderBottomLeftRadius: 8,
4364
- borderBottomRightRadius: 8,
4365
4363
  backgroundColor: '#fff'
4366
4364
  }
4367
4365
  }, React.createElement("input", {
@@ -4379,12 +4377,12 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4379
4377
  value: userInput,
4380
4378
  onChange: handleUserInput,
4381
4379
  onKeyDown: handleKeyPress,
4382
- placeholder: 'Ask a question'
4380
+ placeholder: 'Type your message here'
4383
4381
  }), React.createElement("button", {
4384
4382
  disabled: isLoading != null ? isLoading : true,
4385
4383
  style: {
4386
4384
  backgroundColor: 'transparent',
4387
- color: isLoading ? '#dedede' : chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4385
+ color: '#dedede',
4388
4386
  border: 'none',
4389
4387
  cursor: 'pointer'
4390
4388
  },
@@ -4392,8 +4390,37 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4392
4390
  return sendInputInquiry();
4393
4391
  }
4394
4392
  }, React.createElement(SendMessageIcon, {
4395
- color: isLoading ? '#fff' : chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color
4396
- })))), React.createElement("div", {
4393
+ color: '#fff'
4394
+ }))), React.createElement("div", {
4395
+ style: {
4396
+ backgroundColor: '#f9f9f9',
4397
+ minHeight: 45,
4398
+ display: 'flex',
4399
+ flexDirection: 'column',
4400
+ alignItems: 'center',
4401
+ justifyContent: 'center',
4402
+ borderTop: '1px solid #f9f9f9',
4403
+ borderBottomLeftRadius: 10,
4404
+ borderBottomRightRadius: 10
4405
+ }
4406
+ }, React.createElement("a", {
4407
+ href: 'https://bibot.app',
4408
+ target: '_blank',
4409
+ style: {
4410
+ textDecoration: 'none'
4411
+ }
4412
+ }, " ", React.createElement("small", {
4413
+ style: {
4414
+ color: '#9ba6b2',
4415
+ fontSize: 10,
4416
+ marginBlock: 5
4417
+ }
4418
+ }, "Powered by ", React.createElement("span", {
4419
+ style: {
4420
+ fontWeight: 'bold',
4421
+ color: '#1f4760'
4422
+ }
4423
+ }, "BIBOT"))))), React.createElement("div", {
4397
4424
  style: {
4398
4425
  display: 'flex',
4399
4426
  alignItems: 'center',
@@ -4404,8 +4431,15 @@ var ChatBubbleBiBot = function ChatBubbleBiBot(bibotProps) {
4404
4431
  fontSize: '12px',
4405
4432
  color: chatBubbleConfig === null || chatBubbleConfig === void 0 ? void 0 : chatBubbleConfig.color,
4406
4433
  textAlign: 'left',
4407
- marginRight: '8px',
4408
- whiteSpace: 'nowrap'
4434
+ marginRight: '5px',
4435
+ whiteSpace: 'nowrap',
4436
+ backgroundColor: '#fff',
4437
+ padding: 15,
4438
+ borderTopRightRadius: 30,
4439
+ borderTopLeftRadius: 10,
4440
+ borderBottomLeftRadius: 10,
4441
+ marginBottom: 60,
4442
+ boxShadow: '0 4px 8px 0 rgba(0, 0, 0, 0.2)'
4409
4443
  }
4410
4444
  }, greeting), React.createElement("button", {
4411
4445
  onClick: toggleChat,