@chat21/chat21-web-widget 5.0.94-rc3 → 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 +9 -0
- package/package.json +1 -1
- package/src/app/app.component.scss +0 -41
- package/src/app/app.component.ts +4 -8
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +6 -2
- package/src/app/component/home/home.component.html +1 -3
- package/src/app/component/home/home.component.scss +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
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
|
+
|
|
15
|
+
# 5.0.94-rc4
|
|
16
|
+
- **added**: publish onMessageCreated only if status is >= 100
|
|
17
|
+
|
|
9
18
|
# 5.0.94-rc3
|
|
10
19
|
- **bug-fixed**: if hiddenMessage exist, onNewConversation event is not fired
|
|
11
20
|
|
package/package.json
CHANGED
|
@@ -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);
|
package/src/app/app.component.ts
CHANGED
|
@@ -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 =
|
|
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(
|
|
1807
|
+
this.tiledeskRequestsService.sendMessageToRequest(recipientId, this.g.tiledeskToken, message)
|
|
1812
1808
|
return;
|
|
1813
1809
|
}
|
|
1814
1810
|
|
|
@@ -15,7 +15,7 @@ import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
|
15
15
|
// utils
|
|
16
16
|
import { v4 as uuidv4 } from 'uuid';
|
|
17
17
|
import { HEADER_MENU_OPTION, UID_SUPPORT_GROUP_MESSAGES } from 'src/app/utils/constants';
|
|
18
|
-
import { CHANNEL_TYPE, INFO_MESSAGE_TYPE, TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
18
|
+
import { CHANNEL_TYPE, INFO_MESSAGE_TYPE, MSG_STATUS_SENT, TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
19
19
|
import { getDateDifference } from 'src/chat21-core/utils/utils';
|
|
20
20
|
import { isJustRecived, isUserBanned } from 'src/chat21-core/utils/utils-message';
|
|
21
21
|
|
|
@@ -743,9 +743,13 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
743
743
|
this.logger.debug('[CONV-COMP] ***** DETAIL messageAdded *****', msg);
|
|
744
744
|
if (msg) {
|
|
745
745
|
that.newMessageAdded(msg);
|
|
746
|
-
this.onNewMessageCreated.emit(msg)
|
|
747
746
|
this.checkMessagesLegntForTranscriptDownloadMenuOption();
|
|
748
747
|
this.resetTimeout();
|
|
748
|
+
|
|
749
|
+
/** publish onMessageCreated only if status is >= 100 */
|
|
750
|
+
if(msg.status >= MSG_STATUS_SENT){
|
|
751
|
+
this.onNewMessageCreated.emit(msg)
|
|
752
|
+
}
|
|
749
753
|
// this.updateLeadInfo(msg);
|
|
750
754
|
}
|
|
751
755
|
});
|
|
@@ -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
|
-
|
|
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%;
|