@chat21/chat21-web-widget 5.0.57-rc.1 → 5.0.57-rc.3

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,15 @@
1
1
  # chat21-web-widget ver 5.0
2
2
 
3
+ ### 5.0.57-rc.3
4
+ - changed: tiledesk logo during conversation
5
+ - changed: show entire text of buttons
6
+ - bug-fixed: window.location is undefined in chat21client.js
7
+
8
+ ### 5.0.57-rc.2
9
+ - changed: tiledesk logo during conversation
10
+ - removed: image loader wrapper
11
+ - bug-fixed: callout not render right height if heavy image is received
12
+
3
13
  ### 5.0.57-rc.1
4
14
  - added: fileUploadAccept as a tiledesk property
5
15
  - added: tiledesk logo during conversation
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.57-rc.1",
4
+ "version": "5.0.57-rc.3",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -45,6 +45,7 @@
45
45
 
46
46
  <!-- CONTENT -->
47
47
  <chat-conversation-content
48
+ [class.hideTextReply]="hideFooterTextReply && g?.poweredBy"
48
49
  [messages]="messages"
49
50
  [senderId]="senderId"
50
51
  [baseLocation]="g?.windowContext['tiledesk']?.getBaseLocation()"
@@ -99,10 +100,6 @@
99
100
  <div *ngIf="messagesBadgeCount!=0" id="chat21-divBudge" class="c21-divBudge">{{messagesBadgeCount}}</div>
100
101
  </div>
101
102
 
102
- <!-- <div id="hiddenFooter" *ngIf="!hideTextAreaContent" class="fade-in-bottom">
103
- <div tabindex="-1" class="c21-powered-by" [innerHTML]="g.poweredBy"></div>
104
- </div> -->
105
-
106
103
  <chat-conversation-footer
107
104
  [conversationWith]="conversationWith"
108
105
  [attributes]="g?.attributes"
@@ -9,6 +9,11 @@
9
9
  --foregroundColor: var(--col-msg-sent);
10
10
  }
11
11
 
12
+ :host chat-conversation-content.hideTextReply ::ng-deep .chat21-sheet-content{
13
+
14
+ bottom: var(--chat-footer-height) !important
15
+ }
16
+
12
17
  // ============= CSS #chat21-conversation-component ================= //
13
18
  #chat21-conversation-component {
14
19
  // background-color: #ffffff;
@@ -103,7 +108,7 @@
103
108
  #chat21-buttonToBottom {
104
109
  display: flex;
105
110
  position: relative;
106
- margin-right: -25px; //10px;
111
+ margin-right: 10px; //-25px;
107
112
  margin-top: -40px;
108
113
  float: right;
109
114
  width: 30px;
@@ -66,7 +66,7 @@
66
66
  top: 0;
67
67
  right: 0;
68
68
  left: 0;
69
- bottom: var(--chat-footer-height); //43px;
69
+ bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height));
70
70
  overflow: hidden;
71
71
  .time{
72
72
  margin-bottom: 20px;
@@ -1,3 +1,10 @@
1
+ <!-- LOGO-->
2
+ <div id="hiddenFooter" *ngIf="!hideTextAreaContent && poweredBy" class="fade-in-bottom"
3
+ [class.hideTextReply]="hideTextReply">
4
+ <div tabindex="-1" class="c21-powered-by" [innerHTML]="poweredBy"></div>
5
+ </div>
6
+
7
+ <!-- TEXTAREA + ICONS: conv active-->
1
8
  <div class="textarea-container" *ngIf="!hideTextAreaContent && !hideTextReply">
2
9
 
3
10
  <div class="icons-container">
@@ -69,12 +76,8 @@
69
76
  </div>
70
77
  </div>
71
78
 
72
- <div id="hiddenFooter" *ngIf="!hideTextAreaContent" class="fade-in-bottom"
73
- [class.hideTextReply]="hideTextReply">
74
- <div tabindex="-1" class="c21-powered-by" [innerHTML]="poweredBy"></div>
75
- </div>
76
-
77
79
 
80
+ <!-- EMOJII PICKER-->
78
81
  <div [style.visibility]="isEmojiiPickerShow?'visible':'hidden'" class="emoji-container">
79
82
  <emoji-mart id="emoji-mart"
80
83
  *ngIf="showEmojiPicker"
@@ -90,6 +93,7 @@
90
93
  </emoji-mart>
91
94
  </div>
92
95
 
96
+ <!-- NEW CONV & CONTINE buttons: conv archived-->
93
97
  <div id="floating-container" *ngIf="hideTextAreaContent" class="fade-in-bottom" start-focus-chat21-conversation-component>
94
98
  <button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openNewConversation()" [ngStyle]="{'background-color': stylesMap.get('themeColor'), 'border-color': stylesMap.get('themeColor'), 'color': stylesMap?.get('foregroundColor')}">
95
99
  <span class="v-align-center">
@@ -248,19 +248,16 @@ textarea:active{
248
248
  // position: absolute;
249
249
  bottom: 100%;
250
250
  width: 100%;
251
+ height: 22px;
251
252
  display: flex;
252
253
  align-items: center;
253
254
  justify-content: center;
254
- position: absolute;
255
- box-shadow: inset 0px -22px 16px -15px rgba(0,0,0,0.1);
255
+ // position: absolute;
256
+ // box-shadow: inset 0px -22px 16px -15px rgba(0,0,0,0.1);
256
257
  &.hideTextReply{
257
258
  height: var(--chat-footer-height);
258
259
  position: unset;
259
260
  box-shadow: none;
260
- .c21-powered-by{
261
- background-color: var(--chat-footer-background-color);
262
-
263
- }
264
261
  }
265
262
  .c21-powered-by {
266
263
  // height: 40px;
@@ -38,7 +38,8 @@
38
38
  [fontColor]="stylesMap.get('bubbleReceivedTextColor')"
39
39
  [fontSize]="stylesMap.get('fontSize')"
40
40
  [fontFamily]="stylesMap.get('fontFamily')"
41
- [stylesMap]="stylesMap">
41
+ [stylesMap]="stylesMap"
42
+ (onElementRendered)="onElementRenderedFN($event)">
42
43
  </chat-bubble-message>
43
44
 
44
45
  <div class="c21-icon-avatar" *ngIf="isFirst">
@@ -188,6 +188,20 @@ export class LastMessageComponent implements OnInit, AfterViewInit, OnDestroy {
188
188
  // this.logger.debug('3 isOpenNewMessage: ' + this.g.isOpenNewMessage);
189
189
  this.onCloseMessagePreview.emit();
190
190
  }
191
+
192
+ onElementRenderedFN(event){
193
+ console.log('eventttttttt-->', event, this.messageListWRP)
194
+ this.messageListWRP.forEach((item, index)=> {
195
+ setTimeout(() => {
196
+ if(this.messageListWRP.get(index)){
197
+ let height = getComputedStyle(this.messageListWRP.get(index).nativeElement).height
198
+ console.log('heightttttt--<', height, this.messages[this.messages.length-1])
199
+ this.g.setWidgetPreviewContainerSize(0, +height.substring(0, height.length-2))
200
+ }
201
+ }, 50);
202
+ })
203
+
204
+ }
191
205
  // ========= begin:: event emitter function ============//
192
206
 
193
207
 
@@ -26,7 +26,7 @@
26
26
  font-size: var(--buttonFontSize);
27
27
  -o-text-overflow: ellipsis;
28
28
  text-overflow: ellipsis;
29
- white-space: nowrap;
29
+ // white-space: nowrap;
30
30
  letter-spacing: -0.24px;
31
31
  -webkit-font-smoothing: antialiased;
32
32
  color: var(--textColor); //$blue
@@ -1,6 +1,6 @@
1
1
  <!-- [ngStyle] = "{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; text-align: center; margin: auto"-->
2
2
  <div class="c21-img-container" >
3
- <div *ngIf="loading" class="loader" [ngStyle] = "{ 'width': width , 'height': height }"></div>
3
+ <!-- <div *ngIf="loading" class="loader" [ngStyle] = "{ 'width': width , 'height': height }"></div> -->
4
4
  <img
5
5
  class="message-contentX message-content-imageX"
6
6
  [alt]="metadata?.name"
@@ -27,6 +27,7 @@
27
27
  --bkg-color-info-message: rgba(24, 119, 242, 0.1);
28
28
 
29
29
  --chat-footer-height: 56px;
30
+ --chat-footer-logo-height: 22px;
30
31
  --chat-footer-border-radius: 16px;
31
32
  --chat-footer-background-color: #f6f7fb;
32
33
 
@@ -24,12 +24,13 @@ class Chat21Client {
24
24
  this.reconnections = 0 // just to check how many reconnections
25
25
  this.client_id = this.uuidv4();
26
26
  this.log = options.log ? true : false;
27
+
27
28
  if (options && options.MQTTendpoint) {
28
29
  if (options.MQTTendpoint.startsWith('/')) {
29
30
  if (this.log) {
30
31
  console.log("MQTTendpoint relative url");
31
32
  }
32
- var loc = window.location, new_uri;
33
+ var loc = window.parent.location, new_uri;
33
34
  if (loc.protocol === "https:") {
34
35
  // new_uri = "wss:";
35
36
  new_uri = "mqtt:";
@@ -41,6 +42,7 @@ class Chat21Client {
41
42
  new_uri += "//" + loc.host;
42
43
  // new_uri += loc.pathname + "/to/ws";
43
44
  new_uri += options.MQTTendpoint;
45
+ console.log('new_uriiiiiii', new_uri, loc, document.location, window.parent)
44
46
  this.endpoint = new_uri
45
47
  } else {
46
48
  this.endpoint = options.MQTTendpoint
@@ -987,6 +989,7 @@ class Chat21Client {
987
989
  }
988
990
  if (this.log) {console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)}
989
991
  // client = mqtt.connect('mqtt://127.0.0.1:15675/ws',options)
992
+ console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)
990
993
  this.client = mqtt.connect(this.endpoint,options)
991
994
 
992
995
  this.client.on('connect', // TODO if token is wrong it must reply with an error!
@@ -43,6 +43,7 @@ export class Chat21Service {
43
43
  }
44
44
  if (!this.chatClient) {
45
45
  // const { Chat21Client} = await import("../../../assets/js/chat21client");
46
+
46
47
  this.chatClient = new Chat21Client(this._config);
47
48
  } else {
48
49
  console.log("Did you try again to create a Chat21Client istance?");