@chat21/chat21-web-widget 5.0.53-rc.4 → 5.0.53-rc.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # chat21-web-widget ver 5.0
2
2
 
3
+ ### 5.0.53-rc.6
4
+ - changed: removed wait object from Rule model
5
+ - bug-fixed: splitted message lose original parent message attributes
6
+ - bug-fixed: preChat form element UI padding
7
+
8
+ ### 5.0.53-rc.5
9
+ - changed: minor improvements for last-message component UI
10
+ - changed: last-message UI for long text message and long attachment buttons
11
+ - removed: automatic open widget after 3s on index.html
12
+ - bug-fixed: on click over callout not opens widget correctly if singleConversation is active
13
+
3
14
  ### 5.0.53-rc.4
4
15
  - added: proactive rules from /widget/botsRules
5
16
  - added: imHere method for presence service
@@ -15,6 +26,8 @@
15
26
  - bug-fixed: location.href and document.title is wrong (about:srcdoc)
16
27
  - bug-fixed: wait 2s before publish ImHere event to MQTT presence
17
28
 
29
+ ### 5.0.53 in PROD
30
+
18
31
  ### 5.0.53-rc.3
19
32
  - added: html descriptions to index.html and index-dev.html
20
33
  - changed: script tag for style.css to link tag with rel="stylesheet"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.0.53-rc.4",
4
+ "version": "5.0.53-rc.6",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -115,7 +115,7 @@
115
115
  *******************************************
116
116
  tabindex -> 20 -->
117
117
  <chat-eyeeye-catcher-card *ngIf="g.senderId"
118
- (onOpenChat)="onOpenChatEyeEyeCatcherCard()"
118
+ (onOpenChat)="onOpenCloseWidget($event)"
119
119
  (onCloseEyeCatcherCard)="onCloseEyeCatcherCard($event)">
120
120
  </chat-eyeeye-catcher-card>
121
121
 
@@ -86,6 +86,8 @@ input[type='text'].errors{
86
86
  position: relative;
87
87
  padding-bottom: 0px; //7px;
88
88
  margin: 35px 0px 0px; //27px 0 0;
89
+ display: flex;
90
+ width: 100%;
89
91
  }
90
92
  .form-group label.control-label {
91
93
  font-size: 11px;
@@ -107,7 +109,7 @@ input {
107
109
  border-radius: $chat-footer-border-radius;
108
110
  font-weight: 400;
109
111
  height: 48px;
110
- padding: 16px;
112
+ padding: 0px 16px;
111
113
  font-size: 14px;
112
114
  line-height: 1.42857143;
113
115
  display: block;
@@ -103,7 +103,7 @@ textarea {
103
103
  border-radius: $chat-footer-border-radius;
104
104
  font-weight: 400;
105
105
  // height: 36px;
106
- padding: 16px;
106
+ padding: 0px 16px;
107
107
  font-size: 14px;
108
108
  line-height: 1.42857143;
109
109
  display: block;
@@ -46,7 +46,7 @@
46
46
  position: fixed;
47
47
  // right: 5px;
48
48
  bottom: 90px;
49
- max-height: calc(100% - 75px);
49
+ // max-height: calc(100% - 75px);
50
50
  width: 375px;
51
51
  max-width: 100%;
52
52
  }
@@ -64,11 +64,30 @@
64
64
  border-radius: $border-radius-bubble-message;
65
65
  padding: 0;
66
66
  word-wrap: break-word;
67
+
68
+ max-height: 160px;
69
+ display: flex;
70
+ overflow-y: auto;
67
71
  // padding: 14px;
68
72
  // padding: 6px 6px 6px 6px;
69
73
  // box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
70
74
  // -webkit-animation: heartbeat 1.5s ease-in-out both;
71
75
  // animation: heartbeat 1.5s ease-in-out both;
76
+ &::-webkit-scrollbar {
77
+ width: 6px;
78
+ background-color: #00000000!important;
79
+ }
80
+
81
+ &:hover {
82
+ &::-webkit-scrollbar-track {
83
+ background-color: #f9f9f9 !important;
84
+ }
85
+
86
+ &::-webkit-scrollbar-thumb {
87
+ background: #777777;
88
+ }
89
+
90
+ }
72
91
  }
73
92
 
74
93
  .no-background{
@@ -93,6 +112,7 @@
93
112
  box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 12px 0px;
94
113
  clear: both;
95
114
  margin-left: 45px;
115
+ margin-right: 16px;
96
116
  margin-bottom: 8px;
97
117
  border-radius: 12px 12px 12px 0px;
98
118
  padding: 5px;
@@ -205,6 +225,7 @@
205
225
  }
206
226
 
207
227
  .headerPreviewMessage {
228
+ margin-right: 16px;
208
229
  position: relative;
209
230
  height: 40;// height: 50;
210
231
  margin: 10px 0px 0px 50px;
@@ -53,7 +53,6 @@ export class Rules {
53
53
  private doAction(action: Rule['do']){
54
54
  this.logger.info('[RULES] doAction', this.currentUser, action)
55
55
  let message = action.filter(obj => Object.keys(obj).includes('message'))
56
- let wait = action.filter(obj => Object.keys(obj).includes('wait'))
57
56
  if(message && message.length>0){
58
57
  message[0]['message'].attributes = { ...this.g.attributes, ...message[0]['message'].attributes}
59
58
  message[0]['message'].userAgent = this.g.attributes['client']
@@ -62,10 +61,7 @@ export class Rules {
62
61
  message[0]['message'].language = this.g.lang
63
62
  message[0]['message'].departmentid = this.g.attributes.departmentId
64
63
  console.log('message[0]', message[0]['message'])
65
- setTimeout(() => {
66
- this.tiledeskRequestsService.sendMessageToRequest(this.request_id, this.tiledeskToken, message[0]['message'])
67
- console.log('rulessss', this.appStorageService.getItem('_botsRules'))
68
- }, wait[0]['wait']);
64
+ this.tiledeskRequestsService.sendMessageToRequest(this.request_id, this.tiledeskToken, message[0]['message'])
69
65
  }
70
66
  }
71
67
 
@@ -437,7 +437,7 @@
437
437
 
438
438
  var enbedJs = event_data.detail.appConfigs.enbedJs? event_data.detail.appConfigs.enbedJs : false;
439
439
  document.getElementById("enbed").style.display = enbedJs? "inline-block": "none";
440
- document.getElementById("base_url").innerHTML = enbedJs ? baseUrl + '/launch.js': null;
440
+ document.getElementById("base_url").innerHTML = enbedJs ? window.tiledesk.getBaseLocation() + '/launch.js': null;
441
441
 
442
442
  baseUrlConsole = event_data.detail.appConfigs.dashboardUrl? event_data.detail.appConfigs.dashboardUrl : baseUrlConsole;
443
443
  }
@@ -282,7 +282,7 @@
282
282
 
283
283
  var enbedJs = event_data.detail.appConfigs.enbedJs? event_data.detail.appConfigs.enbedJs : false;
284
284
  document.getElementById("enbed").style.display = enbedJs? "inline-block": "none";
285
- document.getElementById("base_url").innerHTML = enbedJs ? baseUrl + '/launch.js': null;
285
+ document.getElementById("base_url").innerHTML = enbedJs ? window.tiledesk.getBaseLocation() + '/launch.js': null;
286
286
 
287
287
  baseUrlConsole = event_data.detail.appConfigs.dashboardUrl? event_data.detail.appConfigs.dashboardUrl : baseUrlConsole;
288
288
  }
@@ -296,11 +296,11 @@
296
296
  document.getElementById("preloader").style.display = "none";
297
297
  }, 1000);
298
298
  //open widget after 3s if is closed
299
- setTimeout(() => {
300
- if(event_data && event_data.detail && event_data.detail.global && !event_data.detail.global.isOpen){
301
- window.Tiledesk('open')
302
- }
303
- }, 3000);
299
+ // setTimeout(() => {
300
+ // if(event_data && event_data.detail && event_data.detail.global && !event_data.detail.global.isOpen){
301
+ // window.Tiledesk('open')
302
+ // }
303
+ // }, 3000);
304
304
  });
305
305
 
306
306
  window.Tiledesk('onAuthStateChanged', function(event_data) {
@@ -534,6 +534,7 @@ export class FirebaseConversationHandler extends ConversationHandlerService {
534
534
  command_message.isSender = message.isSender;
535
535
  command_message.attributes? command_message.attributes.commands = true : command_message.attributes = {commands : true}
536
536
  command_message.attributes.parentUid = parentUid //added to manage message STATUS UPDATES
537
+ command_message.attributes = {...message.attributes, ...command_message.attributes}
537
538
  this.addedNew(command_message)
538
539
  callback();
539
540
  }
@@ -502,6 +502,7 @@ export class MQTTConversationHandler extends ConversationHandlerService {
502
502
  command_message.isSender = message.isSender;
503
503
  command_message.attributes? command_message.attributes.commands = true : command_message.attributes = {commands : true}
504
504
  command_message.attributes.parentUid = parentUid //added to manage message STATUS UPDATES
505
+ command_message.attributes = {...message.attributes, ...command_message.attributes}
505
506
  this.addedMessage(command_message)
506
507
  callback();
507
508
  }
@@ -70,7 +70,7 @@
70
70
  }
71
71
  #tiledesk-container.closed #tiledeskdiv.messagePreview {
72
72
  width: 375px; /*340px*/
73
- height: 400px; /*300px*/
73
+ height: 440px; /*300px*/
74
74
  min-width: 340px;
75
75
  }
76
76
 
@@ -10,9 +10,10 @@ export interface Rule {
10
10
  regexOption: string,
11
11
  text: string,
12
12
  urlMatches: string,
13
- triggerEvery: number},
13
+ triggerEvery: number
14
+ },
14
15
  do: [
15
- {wait: number},
16
+ // {wait: number},
16
17
  {message: any}
17
18
  ]
18
19
  }