@chat21/chat21-ionic 3.4.21-rc4 → 3.4.21-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 +8 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +2 -2
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +5 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +15 -4
- package/src/app/services/global-settings/global-settings.service.ts +2 -1
- package/src/app/utils/globals.ts +2 -0
- package/src/variables.scss +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.21-rc6
|
|
12
|
+
- **added**: managed allowed_upload_extentions from project settings
|
|
13
|
+
|
|
14
|
+
# 3.4.21-rc5
|
|
15
|
+
- **added**: setConversation as read when agent click on it
|
|
16
|
+
|
|
11
17
|
# 3.4.21-rc4
|
|
12
18
|
- **added**: ability to init and decrement new conversation count badge
|
|
13
19
|
|
|
@@ -20,6 +26,8 @@
|
|
|
20
26
|
# 3.4.21-rc1
|
|
21
27
|
- **added**: implement badge notification for agentDesktop sw when new conversation is assigned to logged agent
|
|
22
28
|
|
|
29
|
+
# 3.4.21 in PROD
|
|
30
|
+
|
|
23
31
|
# 3.4.20 in PROD
|
|
24
32
|
|
|
25
33
|
# 3.4.19 in PROD
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -1345,8 +1345,8 @@ export class AppComponent implements OnInit {
|
|
|
1345
1345
|
|
|
1346
1346
|
subscribeConversationSelected= (conversation: ConversationModel) => {
|
|
1347
1347
|
if(conversation && conversation.is_new){
|
|
1348
|
-
this.audio_NewConv.pause()
|
|
1349
|
-
|
|
1348
|
+
this.audio_NewConv.pause();
|
|
1349
|
+
this.conversationsHandlerService.setConversationRead(conversation.uid)
|
|
1350
1350
|
//UPDATE NOTIFICATION FOR NEW CONVERSATION COUNT
|
|
1351
1351
|
this.setNotification();
|
|
1352
1352
|
}
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
65
65
|
<!-- COPILOT-OPTION -->
|
|
66
|
-
<div *ngIf="isCopilotEnabled" class="copilot-container" id="copilot"
|
|
66
|
+
<div *ngIf="isCopilotEnabled" class="copilot-container" id="copilot">
|
|
67
67
|
<ion-button id="copilot" fill="clear" (click)="onOpenSection('copilot')">
|
|
68
68
|
<ion-icon class="channel-icon" src="assets/images/icons/copilot.svg"></ion-icon>
|
|
69
69
|
{{translationsMap?.get('COPILOT.SOLVE_WITH_AI')}}
|
|
@@ -155,6 +155,7 @@ ion-header {
|
|
|
155
155
|
text-transform: unset;
|
|
156
156
|
padding: var(--button-padding);
|
|
157
157
|
border-radius: var(--button-border-radius);
|
|
158
|
+
border: 1px solid var(--copilot-color);
|
|
158
159
|
font-size: 11px;
|
|
159
160
|
|
|
160
161
|
ion-icon{
|
|
@@ -164,6 +165,10 @@ ion-header {
|
|
|
164
165
|
|
|
165
166
|
&#copilot {
|
|
166
167
|
&:hover{
|
|
168
|
+
background: var(--copilot-hover-background);
|
|
169
|
+
--background-hover: var(--copilot-hover-background);
|
|
170
|
+
--color: var(--copilot-hover-color);
|
|
171
|
+
|
|
167
172
|
ion-icon {
|
|
168
173
|
transition: transform 1s ease-in-out;
|
|
169
174
|
transform: rotate(180deg);
|
|
@@ -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
|
|
@@ -2002,7 +2013,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
2002
2013
|
checkAcceptedFile(draggedFileMimeType) {
|
|
2003
2014
|
let isAcceptFile = false
|
|
2004
2015
|
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ', this.appConfigProvider.getConfig().fileUploadAccept)
|
|
2005
|
-
const accept_files = this.
|
|
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/variables.scss
CHANGED
|
@@ -59,10 +59,12 @@ body {
|
|
|
59
59
|
--textarea-color: #06132b;
|
|
60
60
|
// ***** Conversation-detail: end ***** //
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// ***** Conversation-detail: HEADER: start ***** //
|
|
63
|
+
--copilot-background: #ffffff00;
|
|
64
|
+
--copilot-color: var(--basic-blue);
|
|
65
|
+
--copilot-hover-background: var(--basic-blue);
|
|
66
|
+
--copilot-hover-color: #f8fafc;
|
|
67
|
+
// ***** Conversation-detail: HEADER: end ***** //
|
|
66
68
|
|
|
67
69
|
// ***** Conversation-detail PRIVATE-MSG: start ***** //
|
|
68
70
|
--bubble-lightyellow: rgb(255, 247, 237);
|