@chat21/chat21-web-widget 5.0.94-rc4 → 5.0.94-rc6

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
@@ -6,6 +6,12 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.0.94-rc6
10
+ - **bug-fixed**: logoChat is not rendered if contains special characters (ex. "(" or ")" ) in the name of the resource
11
+
12
+ # 5.0.94-rc5
13
+ - **bug-fixed**: onNewConversationWithMessage create new conv and not use che current one just created
14
+
9
15
  # 5.0.94-rc4
10
16
  - **added**: publish onMessageCreated only if status is >= 100
11
17
 
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.94-rc4",
4
+ "version": "5.0.94-rc6",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -128,47 +128,6 @@ body {
128
128
  // // -webkit-animation: fade-in-dw-up 0.7s cubic-bezier(0.600, -0.280, 0.735, 0.045) 0.8s;
129
129
  // // animation: fade-in-dw-up 0.7s cubic-bezier(0.600, -0.280, 0.735, 0.045) 0.8s;
130
130
  // }
131
- .avatar-project {
132
- position: relative;
133
- padding: 0;
134
- margin: 0;
135
- height: 70px;//52px;
136
- width: 80px; //100%;
137
- line-height: 52px;
138
-
139
- .avatar-placeholder {
140
- position: absolute;
141
- top: 0;
142
- left: 0;
143
- width: 100%;
144
- height: 100%;
145
- border-radius: 50%;
146
- max-width: 52px;
147
- text-align: center;
148
- font-size: 20px;
149
- color: #ffffff;
150
- font-weight: 500;
151
- }
152
- .avatar-image {
153
- position: absolute;
154
- top: 0;
155
- bottom: 0;
156
- margin: 0px;
157
- left: 0;
158
- width: 100%; //90%;
159
- height: 100%; //80%;
160
- // max-width: 42px;
161
- max-height: 100%; //32px;
162
- text-align: left;
163
- background-color: transparent;
164
- background-repeat: no-repeat;
165
- background-size: contain;
166
- background-attachment: initial;
167
- background-position: left;
168
- background-origin: content-box;
169
- }
170
- }
171
-
172
131
 
173
132
  textarea::placeholder {
174
133
  color: var(--gray);
@@ -728,7 +728,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
728
728
  /** allow to start conversation with an hidden message (without publishing 'new_conversation' event) */
729
729
  this.logger.debug('[APP-COMP] AppComponent::startNewConversation hiddenMessage',this.g.hiddenMessage );
730
730
  if(this.g.hiddenMessage){
731
- this.onNewConversationWithMessage(this.g.hiddenMessage)
731
+ this.onNewConversationWithMessage(newConvId, this.g.hiddenMessage)
732
732
  }
733
733
 
734
734
  this.triggerNewConversationEvent(newConvId);
@@ -1791,24 +1791,20 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
1791
1791
  }
1792
1792
 
1793
1793
 
1794
- onNewConversationWithMessage(text: string, subType: string = 'info'){
1794
+ onNewConversationWithMessage(recipientId: string, text: string, subType: string = 'info'){
1795
1795
  this.logger.log('[APP-COMP] onNewConversationWithMessage in APP COMPONENT', text);
1796
1796
 
1797
- const newConvId = this.generateNewUidConversation();
1798
- this.g.setParameter('recipientId', newConvId);
1799
- this.appStorageService.setItem('recipientId', newConvId)
1800
-
1801
1797
  let message: any = {}
1802
1798
  message.attributes = { subtype: subType, ...this.g.attributes}
1803
1799
  message.userAgent = this.g.attributes['client']
1804
- message.request_id = newConvId
1800
+ message.request_id = recipientId
1805
1801
  message.sourcePage = this.g.attributes['sourcePage']
1806
1802
  message.language = this.g.lang
1807
1803
  message.text = '/'+ text
1808
1804
  message.participants = this.g.participants
1809
1805
  message.departmentid = this.g.attributes.departmentId
1810
1806
  // this.sendMessage(message)
1811
- this.tiledeskRequestsService.sendMessageToRequest(newConvId, this.g.tiledeskToken, message)
1807
+ this.tiledeskRequestsService.sendMessageToRequest(recipientId, this.g.tiledeskToken, message)
1812
1808
  return;
1813
1809
  }
1814
1810
 
@@ -27,9 +27,7 @@
27
27
  <div class="c21-header-content">
28
28
  <!-- LOGO HEADER -->
29
29
  <div *ngIf="g.project.logoChat !== 'nologo'" class='avatar-project' item-start>
30
- <!-- <div *ngIf="g.project.logoChat == 'tiledesklogo'" #avatarPlaceholder class="avatar-placeholder" [style.background-color]="g.project.color" [innerHTML]="g.project.avatar"></div>
31
- <div *ngIf="g.project.logoChat !== 'tiledesklogo'" #avatarImage class="avatar-image" [style.background-image]="'url(' + g.project.logoChat + ')'"></div> -->
32
- <div #avatarImage class="avatar-image" [style.background-image]="'url(' + g.project.logoChat + ')'"></div>
30
+ <img #avatarImage class="avatar-image" [src]="g.project.logoChat"/>
33
31
  </div>
34
32
 
35
33
  <!-- MESSAGE HEADER -->
@@ -39,6 +39,36 @@
39
39
  width: 100%;
40
40
  height: 100%;
41
41
  position: absolute;
42
+
43
+ .avatar-project {
44
+ position: relative;
45
+ padding: 0;
46
+ margin: 0;
47
+ height: 70px;//52px;
48
+ width: 80px; //100%;
49
+ line-height: 52px;
50
+
51
+ .avatar-placeholder {
52
+ position: absolute;
53
+ top: 0;
54
+ left: 0;
55
+ width: 100%;
56
+ height: 100%;
57
+ border-radius: 50%;
58
+ max-width: 52px;
59
+ text-align: center;
60
+ font-size: 20px;
61
+ color: #ffffff;
62
+ font-weight: 500;
63
+ }
64
+ .avatar-image {
65
+ max-width: 100%;
66
+ max-height: 100%;
67
+ height: auto;
68
+ width: auto;
69
+ }
70
+ }
71
+
42
72
  .c21-header-button {
43
73
  display: block;
44
74
  width: 100%;