@chat21/chat21-ionic 3.4.21 → 3.4.23-rc1
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 +25 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +18 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +4 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +4 -4
- package/src/app/components/utils/user-presence/user-presence.component.scss +4 -2
- package/src/app/directives/tooltip.directive.ts +4 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +16 -5
- package/src/app/services/global-settings/global-settings.service.ts +2 -1
- package/src/app/utils/globals.ts +2 -0
- package/src/global.scss +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,31 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.23-rc1
|
|
12
|
+
- **bug-fixed**: cannot click to change user status
|
|
13
|
+
- **bug-fixed**: tooltip not hided alfter click on it
|
|
14
|
+
|
|
15
|
+
# 3.4.22 in PROD
|
|
16
|
+
- **added**: managed allowed_upload_extentions from project settings
|
|
17
|
+
|
|
18
|
+
# 3.4.21-rc6
|
|
19
|
+
- **added**: managed allowed_upload_extentions from project settings
|
|
20
|
+
|
|
21
|
+
# 3.4.21-rc5
|
|
22
|
+
- **added**: setConversation as read when agent click on it
|
|
23
|
+
|
|
24
|
+
# 3.4.21-rc4
|
|
25
|
+
- **added**: ability to init and decrement new conversation count badge
|
|
26
|
+
|
|
27
|
+
# 3.4.21-rc3
|
|
28
|
+
- **changed**: badge notification for agentDesktop
|
|
29
|
+
|
|
30
|
+
# 3.4.21-rc2
|
|
31
|
+
- **added**: count in newConversation handler event
|
|
32
|
+
|
|
33
|
+
# 3.4.21-rc1
|
|
34
|
+
- **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
|
|
35
|
+
|
|
11
36
|
# 3.4.21 in PROD
|
|
12
37
|
|
|
13
38
|
# 3.4.20 in PROD
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -168,6 +168,7 @@ export class AppComponent implements OnInit {
|
|
|
168
168
|
}, { capture: true });
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
|
|
171
172
|
listenChatAlreadyOpenWithoutParamsInMobileMode() {
|
|
172
173
|
this.events.subscribe('noparams:mobile', (isAlreadyOpenInMobileMode) => {
|
|
173
174
|
// console.log('[APP-COMP] Chat is Already Open In Mobile Mode ', isAlreadyOpenInMobileMode)
|
|
@@ -332,7 +333,7 @@ export class AppComponent implements OnInit {
|
|
|
332
333
|
|
|
333
334
|
listenToPostMsgs() {
|
|
334
335
|
window.addEventListener("message", (event) => {
|
|
335
|
-
this.logger.log("[APP-COMP] message event ", event);
|
|
336
|
+
// this.logger.log("[APP-COMP] message event ", event);
|
|
336
337
|
|
|
337
338
|
if (event && event.data && event.data.action && event.data.parameter) {
|
|
338
339
|
if (event.data.action === 'openJoinConversationModal') {
|
|
@@ -1110,6 +1111,7 @@ export class AppComponent implements OnInit {
|
|
|
1110
1111
|
if (conversation && conversation.is_new === true && this.isInitialized) {
|
|
1111
1112
|
this.manageTabNotification('conv_added', conversation.sound)
|
|
1112
1113
|
this.manageEventNewConversation(conversation)
|
|
1114
|
+
this.setNotification();
|
|
1113
1115
|
}
|
|
1114
1116
|
if(conversation) this.updateConversationsOnStorage()
|
|
1115
1117
|
});
|
|
@@ -1343,7 +1345,10 @@ export class AppComponent implements OnInit {
|
|
|
1343
1345
|
|
|
1344
1346
|
subscribeConversationSelected= (conversation: ConversationModel) => {
|
|
1345
1347
|
if(conversation && conversation.is_new){
|
|
1346
|
-
this.audio_NewConv.pause()
|
|
1348
|
+
this.audio_NewConv.pause();
|
|
1349
|
+
this.conversationsHandlerService.setConversationRead(conversation.uid)
|
|
1350
|
+
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1351
|
+
this.setNotification();
|
|
1347
1352
|
}
|
|
1348
1353
|
}
|
|
1349
1354
|
|
|
@@ -1419,6 +1424,9 @@ export class AppComponent implements OnInit {
|
|
|
1419
1424
|
this.logger.debug('[APP-COMP]-CONVS - INIT CONV CONVS 2', conversations)
|
|
1420
1425
|
this.events.publish('appcompSubscribeToConvs:loadingIsActive', false);
|
|
1421
1426
|
}
|
|
1427
|
+
|
|
1428
|
+
//INIT NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1429
|
+
this.setNotification();
|
|
1422
1430
|
});
|
|
1423
1431
|
|
|
1424
1432
|
}
|
|
@@ -1635,6 +1643,14 @@ export class AppComponent implements OnInit {
|
|
|
1635
1643
|
this.triggerEvents.triggerOnNewConversationInit(conversation)
|
|
1636
1644
|
}
|
|
1637
1645
|
|
|
1646
|
+
private setNotification() {
|
|
1647
|
+
this.logger.log('[APP-COMP] setNotification for NEW CONVERSATION');
|
|
1648
|
+
if(window['AGENTDESKTOP']){
|
|
1649
|
+
this.logger.log('[APP-COMP] manageNotification AGENTDESKTOP exist', window['AGENTDESKTOP']);
|
|
1650
|
+
window['AGENTDESKTOP']['TAB'].Badge(this.conversationsHandlerService.countIsNew().toString())
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1638
1654
|
|
|
1639
1655
|
@HostListener('document:visibilitychange', [])
|
|
1640
1656
|
visibilitychange() {
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
// transform: translate(0);
|
|
37
37
|
transform: translate(60px);
|
|
38
38
|
display: block;
|
|
39
|
-
left: 0px;
|
|
39
|
+
// left: 0px;
|
|
40
|
+
left: 10px;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.user-details-btn-close {
|
|
@@ -243,7 +244,7 @@
|
|
|
243
244
|
-webkit-font-smoothing: antialiased;
|
|
244
245
|
vertical-align: middle;
|
|
245
246
|
cursor: pointer;
|
|
246
|
-
|
|
247
|
+
height: 60px;
|
|
247
248
|
&:hover {
|
|
248
249
|
text-decoration: underline;
|
|
249
250
|
}
|
|
@@ -258,7 +259,7 @@
|
|
|
258
259
|
text-align: center;
|
|
259
260
|
|
|
260
261
|
padding-bottom: 15px;
|
|
261
|
-
padding-top:
|
|
262
|
+
padding-top: 56px;
|
|
262
263
|
font-size: 16px;
|
|
263
264
|
font-weight: 400;
|
|
264
265
|
z-index: 1;
|
|
@@ -87,7 +87,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
87
87
|
|
|
88
88
|
subcribeToAuthStateChanged() {
|
|
89
89
|
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
90
|
-
|
|
90
|
+
this.logger.log('[SIDEBAR-USER-DETAILS] BSAuthStateChanged ', state)
|
|
91
91
|
|
|
92
92
|
if (state === 'online') {
|
|
93
93
|
const storedCurrentUser = this.appStorageService.getItem('currentUser')
|
|
@@ -281,7 +281,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
281
281
|
listenToCurrentStoredProject() {
|
|
282
282
|
this.events.subscribe('storage:last_project', projectObjct => {
|
|
283
283
|
if (projectObjct && projectObjct !== 'undefined') {
|
|
284
|
-
//
|
|
284
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
|
|
285
285
|
|
|
286
286
|
//TODO: recuperare info da root e non da id_project
|
|
287
287
|
this.project = {
|
|
@@ -309,7 +309,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
309
309
|
|
|
310
310
|
try {
|
|
311
311
|
this.tiledeskToken = this.appStorageService.getItem('tiledeskToken');
|
|
312
|
-
//
|
|
312
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', this.tiledeskToken)
|
|
313
313
|
} catch (err) {
|
|
314
314
|
this.logger.error('[SIDEBAR-USER-DETAILS] - GET STORED TOKEN ', err)
|
|
315
315
|
}
|
|
@@ -346,7 +346,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
346
346
|
|
|
347
347
|
if (projectUser) {
|
|
348
348
|
if (projectUser['user_available'] === false && projectUser['profileStatus'] === 'inactive') {
|
|
349
|
-
//
|
|
349
|
+
// this.logger.log('teammateStatus ', this.teammateStatus)
|
|
350
350
|
this.selectedStatus = this.teammateStatus[2].id;
|
|
351
351
|
this.logger.debug('[SIDEBAR-USER-DETAILS] - PROFILE_STATUS selected option', this.teammateStatus[2].name);
|
|
352
352
|
this.teammateStatus = this.teammateStatus.slice(0)
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
[isCopilotEnabled]="isCopilotEnabled"
|
|
211
211
|
[supportMode]="supportMode"
|
|
212
212
|
[leadInfo]="leadInfo"
|
|
213
|
-
[fileUploadAccept]="
|
|
213
|
+
[fileUploadAccept]="fileUploadAccept"
|
|
214
214
|
[emailSection]="isEmailEnabled"
|
|
215
215
|
[offlineMsgEmail]="offlineMsgEmail"
|
|
216
216
|
[whatsappTemplatesSection]="isWhatsappTemplatesEnabled"
|
|
@@ -154,6 +154,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
154
154
|
isEmailEnabled: boolean;
|
|
155
155
|
offlineMsgEmail: boolean;
|
|
156
156
|
isWhatsappTemplatesEnabled: boolean;
|
|
157
|
+
fileUploadAccept: string;
|
|
157
158
|
//SOUND
|
|
158
159
|
setTimeoutSound: any;
|
|
159
160
|
audio: any;
|
|
@@ -490,7 +491,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
490
491
|
this.showMessageWelcome = false
|
|
491
492
|
|
|
492
493
|
const appconfig = this.appConfigProvider.getConfig()
|
|
493
|
-
this.tenant = appconfig.firebaseConfig.tenant
|
|
494
|
+
this.tenant = appconfig.firebaseConfig.tenant;
|
|
494
495
|
this.logger.log('[CONVS-DETAIL] - initialize -> firebaseConfig tenant ', this.tenant)
|
|
495
496
|
|
|
496
497
|
this.logger.log('[CONVS-DETAIL] - initialize -> conversationWith: ', this.conversationWith, ' -> conversationWithFullname: ', this.conversationWithFullname)
|
|
@@ -570,7 +571,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
570
571
|
const projectId = project.id_project
|
|
571
572
|
this.canShowCanned = this.projectPlanUtils.checkPlanIsExpired(project)
|
|
572
573
|
this.offlineMsgEmail = this.checkOfflineMsgEmailIsEnabled(project)
|
|
573
|
-
this.isCopilotEnabled = this.projectPlanUtils.checkProjectProfileFeature(project, 'copilot')
|
|
574
|
+
this.isCopilotEnabled = this.projectPlanUtils.checkProjectProfileFeature(project, 'copilot');
|
|
575
|
+
this.fileUploadAccept = this.checkAcceptedUploadFile(project)
|
|
574
576
|
}
|
|
575
577
|
}, (error) => {
|
|
576
578
|
this.logger.error('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error)
|
|
@@ -599,6 +601,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
599
601
|
return check
|
|
600
602
|
}
|
|
601
603
|
|
|
604
|
+
checkAcceptedUploadFile(project: Project): string {
|
|
605
|
+
|
|
606
|
+
if(project && project?.settings?.allowed_upload_extentions){
|
|
607
|
+
return this.g.fileUploadAccept = project?.settings?.allowed_upload_extentions
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
return this.appConfigProvider.getConfig().fileUploadAccept
|
|
611
|
+
}
|
|
612
|
+
|
|
602
613
|
// getProjectIdSelectedConversation(conversationWith: string): string{
|
|
603
614
|
// const conversationWith_segments = conversationWith.split('-')
|
|
604
615
|
// // Removes the last element of the array if is = to the separator
|
|
@@ -2001,8 +2012,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
2001
2012
|
|
|
2002
2013
|
checkAcceptedFile(draggedFileMimeType) {
|
|
2003
2014
|
let isAcceptFile = false
|
|
2004
|
-
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ', this.
|
|
2005
|
-
const accept_files = this.
|
|
2015
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ', this.fileUploadAccept)
|
|
2016
|
+
const accept_files = this.fileUploadAccept
|
|
2006
2017
|
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - mimeType: ', draggedFileMimeType)
|
|
2007
2018
|
if (accept_files === '*/*') {
|
|
2008
2019
|
isAcceptFile = true
|
|
@@ -2168,7 +2179,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
2168
2179
|
this.logger.log('[CONVS-DETAIL] ----> FILE - DROP mimeType files ', mimeType)
|
|
2169
2180
|
|
|
2170
2181
|
// const isAccepted = this.checkAcceptedFile(mimeType)
|
|
2171
|
-
const canUploadFile = checkAcceptedFile(mimeType, this.
|
|
2182
|
+
const canUploadFile = checkAcceptedFile(mimeType, this.fileUploadAccept)
|
|
2172
2183
|
if(!canUploadFile){
|
|
2173
2184
|
this.presentToast(this.translationsMap.get('FAILED_TO_UPLOAD_THE_FORMAT_IS_NOT_SUPPORTED'), 'danger', 'toast-custom-class', 5000)
|
|
2174
2185
|
return;
|
|
@@ -54,7 +54,8 @@ export class GlobalSettingsService {
|
|
|
54
54
|
this.globals.supportMode = getParameterValue('supportMode', this.appConfigService.getConfig());
|
|
55
55
|
/** INIT STORAGE SERVICE */
|
|
56
56
|
this.appStorageService.initialize(environment.storage_prefix, this.globals.persistence, '')
|
|
57
|
-
|
|
57
|
+
/** INIT FILEUPLOADACCEPT parameter */
|
|
58
|
+
this.globals.fileUploadAccept = this.appConfigService.getConfig().fileUploadAccept;
|
|
58
59
|
/** LOAD PARAMETERS
|
|
59
60
|
* set parameters in globals
|
|
60
61
|
*/
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -13,6 +13,7 @@ export class Globals {
|
|
|
13
13
|
persistence: string;
|
|
14
14
|
lang: string;
|
|
15
15
|
jwt: string;
|
|
16
|
+
fileUploadAccept: string;
|
|
16
17
|
|
|
17
18
|
constructor(
|
|
18
19
|
) { }
|
|
@@ -32,6 +33,7 @@ export class Globals {
|
|
|
32
33
|
this.logLevel = 'ERROR'
|
|
33
34
|
this.persistence = 'local';
|
|
34
35
|
this.lang = 'en'
|
|
36
|
+
this.fileUploadAccept = 'image/*,.pdf,.txt'
|
|
35
37
|
|
|
36
38
|
}
|
|
37
39
|
|
package/src/global.scss
CHANGED
|
@@ -296,7 +296,8 @@ select:-webkit-autofill:focus {
|
|
|
296
296
|
|
|
297
297
|
// SIDEBAR: start
|
|
298
298
|
.sidebar {
|
|
299
|
-
background-color: var(--sidebar-background-color);
|
|
299
|
+
// background-color: var(--sidebar-background-color);
|
|
300
|
+
background-color: var(--sidebar-header-background);
|
|
300
301
|
color: var(--sidebar-color);
|
|
301
302
|
|
|
302
303
|
transition-property: top, bottom, width;
|