@chat21/chat21-web-widget 5.0.57-rc.2 → 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,10 @@
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
+
3
8
  ### 5.0.57-rc.2
4
9
  - changed: tiledesk logo during conversation
5
10
  - removed: image loader wrapper
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.2",
4
+ "version": "5.0.57-rc.3",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -45,7 +45,7 @@
45
45
 
46
46
  <!-- CONTENT -->
47
47
  <chat-conversation-content
48
- [class.hideTextReply]="!hideFooterTextReply"
48
+ [class.hideTextReply]="hideFooterTextReply && g?.poweredBy"
49
49
  [messages]="messages"
50
50
  [senderId]="senderId"
51
51
  [baseLocation]="g?.windowContext['tiledesk']?.getBaseLocation()"
@@ -11,7 +11,7 @@
11
11
 
12
12
  :host chat-conversation-content.hideTextReply ::ng-deep .chat21-sheet-content{
13
13
 
14
- bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height)) !important
14
+ bottom: var(--chat-footer-height) !important
15
15
  }
16
16
 
17
17
  // ============= CSS #chat21-conversation-component ================= //
@@ -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,5 +1,5 @@
1
1
  <!-- LOGO-->
2
- <div id="hiddenFooter" *ngIf="!hideTextAreaContent" class="fade-in-bottom"
2
+ <div id="hiddenFooter" *ngIf="!hideTextAreaContent && poweredBy" class="fade-in-bottom"
3
3
  [class.hideTextReply]="hideTextReply">
4
4
  <div tabindex="-1" class="c21-powered-by" [innerHTML]="poweredBy"></div>
5
5
  </div>
@@ -253,15 +253,11 @@ textarea:active{
253
253
  align-items: center;
254
254
  justify-content: center;
255
255
  // position: absolute;
256
- box-shadow: inset 0px -22px 16px -15px rgba(0,0,0,0.1);
256
+ // box-shadow: inset 0px -22px 16px -15px rgba(0,0,0,0.1);
257
257
  &.hideTextReply{
258
258
  height: var(--chat-footer-height);
259
259
  position: unset;
260
260
  box-shadow: none;
261
- .c21-powered-by{
262
- background-color: var(--chat-footer-background-color);
263
-
264
- }
265
261
  }
266
262
  .c21-powered-by {
267
263
  // height: 40px;
@@ -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
@@ -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?");