@chat21/chat21-ionic 3.0.81 → 3.0.82-rc.2
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 +88 -4
- package/README.md +2 -2
- package/deploy_amazon_beta.sh +29 -0
- package/deploy_amazon_prod.sh +30 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +20 -2
- package/src/app/app.component.ts +128 -18
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +171 -88
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +40 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -25
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +7 -7
- package/src/app/components/canned-response/canned-response.component.scss +10 -4
- package/src/app/components/canned-response/canned-response.component.ts +1 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -6
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +24 -84
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +189 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +43 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +1 -1
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +41 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +182 -110
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +4 -26
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/js/chat21client.js +176 -149
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-native-mqtt.json +3 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +38 -10
- package/src/global.scss +52 -255
- package/src/index.html +0 -9
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
|
|
2
|
-
import {
|
|
2
|
+
import { URL_SOUND_LIST_CONVERSATION } from './../../../chat21-core/utils/constants'
|
|
3
3
|
import {
|
|
4
4
|
Component,
|
|
5
5
|
OnInit,
|
|
@@ -115,16 +115,14 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
115
115
|
public lastConnectionDate: string
|
|
116
116
|
public showMessageWelcome: boolean
|
|
117
117
|
public openInfoConversation = false
|
|
118
|
-
public openInfoMessage: boolean // check is open info message
|
|
119
118
|
public isMobile = false
|
|
120
119
|
public isLessThan991px = false // nk added
|
|
121
|
-
public isTyping = false
|
|
122
|
-
public nameUserTypingNow: string
|
|
123
120
|
|
|
124
121
|
public heightMessageTextArea = ''
|
|
125
|
-
public
|
|
122
|
+
public translationsMap: Map<string, string> = new Map()
|
|
123
|
+
public translationsHeaderMap: Map<string, string> = new Map()
|
|
124
|
+
public translationsContentMap: Map<string, string> = new Map()
|
|
126
125
|
public conversationAvatar: any
|
|
127
|
-
public membersConversation: any
|
|
128
126
|
public member: UserModel
|
|
129
127
|
public urlConversationSupportGroup: any
|
|
130
128
|
public isFileSelected: boolean
|
|
@@ -150,7 +148,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
150
148
|
//SOUND
|
|
151
149
|
setTimeoutSound: any;
|
|
152
150
|
audio: any;
|
|
153
|
-
isOpenInfoConversation: boolean;
|
|
154
151
|
USER_HAS_OPENED_CLOSE_INFO_CONV: boolean = false;
|
|
155
152
|
isHovering: boolean = false;
|
|
156
153
|
conversation_count: number;
|
|
@@ -172,6 +169,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
172
169
|
public disableTextarea: boolean;
|
|
173
170
|
appsidebarIsWide: boolean;
|
|
174
171
|
|
|
172
|
+
// ========== begin:: typying =======
|
|
173
|
+
public isTypings = false;
|
|
174
|
+
public isDirect = false;
|
|
175
|
+
public idUserTypingNow: string;
|
|
176
|
+
public nameUserTypingNow: string;
|
|
177
|
+
private setTimeoutWritingMessages;
|
|
178
|
+
membersConversation = ['SYSTEM'];
|
|
179
|
+
// ========== end:: typying =======
|
|
180
|
+
|
|
175
181
|
/**
|
|
176
182
|
* Constructor
|
|
177
183
|
* @param route
|
|
@@ -240,21 +246,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
240
246
|
// -----------------------------------------------------------
|
|
241
247
|
ngOnInit() {
|
|
242
248
|
this.logger.log('[CONVS-DETAIL] > ngOnInit - window.location: ', window.location);
|
|
243
|
-
|
|
244
|
-
// const accept_files = this.appConfigProvider.getConfig().fileUploadAccept;
|
|
245
|
-
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept typeof accept_files ', typeof accept_files);
|
|
246
|
-
// const accept_files_array = accept_files.split(',')
|
|
247
|
-
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array ', accept_files_array);
|
|
248
|
-
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_files_array typeof: ', typeof accept_files_array);
|
|
249
|
-
|
|
250
|
-
// accept_files_array.forEach(accept_file => {
|
|
251
|
-
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file ', accept_file);
|
|
252
|
-
// const accept_file_segment = accept_file.split('/')
|
|
253
|
-
// this.logger.log('[CONVS-DETAIL] > ngOnInit - fileUploadAccept accept_file_segment ', accept_file_segment);
|
|
254
|
-
// if (accept_file_segment[1] === '*') {
|
|
255
|
-
|
|
256
|
-
// }
|
|
257
|
-
// });
|
|
249
|
+
|
|
258
250
|
this.getConversations();
|
|
259
251
|
this.watchToConnectionStatus();
|
|
260
252
|
this.getOSCODE();
|
|
@@ -275,21 +267,21 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
275
267
|
// console.log('[CONVS-DETAIL] HAS CLICKED ENLARGE SIDEBAR WIDE chatAreaEle ', chatAreaEle)
|
|
276
268
|
|
|
277
269
|
if (event && event.data && event.data.action && event.data.action === 'openAppsSidebarWideMode' && event.data.parameter === true) {
|
|
278
|
-
this.logger.log('[CONVS-DETAIL]
|
|
270
|
+
this.logger.log('[CONVS-DETAIL] openAppsSidebarWideMode EVENT-> open' )
|
|
279
271
|
this.appsidebarIsWide = true
|
|
280
272
|
// chat21InfoConversationEle.classList.add("info-convs-apps-sidebar-wide");
|
|
281
273
|
// chatAreaEle.classList.add("chat-area-apps-sidebar-wide");
|
|
282
274
|
}
|
|
283
275
|
|
|
284
276
|
if (event && event.data && event.data.action && event.data.action === 'openAppsSidebarWideMode' && event.data.parameter === false) {
|
|
285
|
-
this.logger.log('[CONVS-DETAIL]
|
|
277
|
+
this.logger.log('[CONVS-DETAIL] openAppsSidebarWideMode EVENT-> close')
|
|
286
278
|
this.appsidebarIsWide = false
|
|
287
279
|
// chat21InfoConversationEle.classList.remove("info-convs-apps-sidebar-wide");
|
|
288
280
|
// chatAreaEle.classList.remove("chat-area-apps-sidebar-wide");
|
|
289
281
|
}
|
|
290
282
|
|
|
291
283
|
if (event && event.data && event.data.action && event.data.action === 'closeAppsSidebarWideMode' && event.data.parameter === true) {
|
|
292
|
-
this.logger.log('[CONVS-DETAIL]
|
|
284
|
+
this.logger.log('[CONVS-DETAIL] closeAppsSidebarWideMode EVENT-> close')
|
|
293
285
|
this.appsidebarIsWide = false
|
|
294
286
|
// chat21InfoConversationEle.classList.remove("info-convs-apps-sidebar-wide");
|
|
295
287
|
// chatAreaEle.classList.remove("chat-area-apps-sidebar-wide");
|
|
@@ -339,7 +331,12 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
339
331
|
// this.updateConversationBadge()
|
|
340
332
|
// }
|
|
341
333
|
if(conv.uid && conv.uid === this.conversationWith){
|
|
342
|
-
this.conversationAvatar = setConversationAvatar(
|
|
334
|
+
this.conversationAvatar = setConversationAvatar(
|
|
335
|
+
conv.conversation_with,
|
|
336
|
+
conv.conversation_with_fullname,
|
|
337
|
+
conv.channel_type,
|
|
338
|
+
conv.attributes['projectId'],
|
|
339
|
+
conv.attributes['project_name'])
|
|
343
340
|
}
|
|
344
341
|
|
|
345
342
|
}
|
|
@@ -477,6 +474,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
477
474
|
this.loggedUser = this.tiledeskAuthService.getCurrentUser()
|
|
478
475
|
this.logger.log('[CONVS-DETAIL] - initialize -> loggedUser: ', this.loggedUser)
|
|
479
476
|
this.translations()
|
|
477
|
+
this.setStyleMap()
|
|
480
478
|
// this.conversationSelected = localStorage.getItem('conversationSelected');
|
|
481
479
|
this.showButtonToBottom = false
|
|
482
480
|
this.showMessageWelcome = false
|
|
@@ -491,7 +489,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
491
489
|
|
|
492
490
|
this.messages = [] // list messages of conversation
|
|
493
491
|
this.isFileSelected = false // indicates if a file has been selected (image to upload)
|
|
494
|
-
this.openInfoMessage = false // indicates whether the info message panel is open
|
|
495
492
|
|
|
496
493
|
if (checkPlatformIsMobile()) {
|
|
497
494
|
this.isMobile = true
|
|
@@ -507,13 +504,11 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
507
504
|
if (checkWindowWidthIsLessThan991px()) {
|
|
508
505
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
509
506
|
this.openInfoConversation = false // indica se è aperto il box info conversazione
|
|
510
|
-
this.
|
|
511
|
-
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
507
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation)
|
|
512
508
|
} else {
|
|
513
509
|
this.logger.log('[CONVS-DETAIL] - initialize -> checkWindowWidthIsLessThan991px ', checkWindowWidthIsLessThan991px())
|
|
514
510
|
this.openInfoConversation = true
|
|
515
|
-
this.
|
|
516
|
-
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation, ' -> isOpenInfoConversation ', this.isOpenInfoConversation)
|
|
511
|
+
this.logger.log('[CONVS-DETAIL] - initialize -> openInfoConversation ', this.openInfoConversation)
|
|
517
512
|
}
|
|
518
513
|
}
|
|
519
514
|
|
|
@@ -532,6 +527,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
532
527
|
this.addEventsKeyboard()
|
|
533
528
|
this.startConversation()
|
|
534
529
|
this.updateConversationBadge() // AGGIORNO STATO DELLA CONVERSAZIONE A 'LETTA' (is_new = false)
|
|
530
|
+
|
|
531
|
+
this.initializeTyping();
|
|
535
532
|
}
|
|
536
533
|
|
|
537
534
|
_getProjectIdByConversationWith(conversationWith: string) {
|
|
@@ -566,22 +563,12 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
566
563
|
})
|
|
567
564
|
}
|
|
568
565
|
|
|
569
|
-
returnOpenCloseInfoConversation(openInfoConversation: boolean) {
|
|
570
|
-
this.logger.log('[CONVS-DETAIL] returnOpenCloseInfoConversation - openInfoConversation ', openInfoConversation)
|
|
571
|
-
this.resizeTextArea()
|
|
572
|
-
this.openInfoMessage = false
|
|
573
|
-
this.openInfoConversation = openInfoConversation
|
|
574
|
-
this.isOpenInfoConversation = openInfoConversation
|
|
575
|
-
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
576
|
-
}
|
|
577
|
-
|
|
578
566
|
@HostListener('window:resize', ['$event'])
|
|
579
567
|
onResize(event: any) {
|
|
580
568
|
const newInnerWidth = event.target.innerWidth
|
|
581
569
|
if (newInnerWidth < 991) {
|
|
582
570
|
if (this.USER_HAS_OPENED_CLOSE_INFO_CONV === false) {
|
|
583
571
|
this.openInfoConversation = false
|
|
584
|
-
this.isOpenInfoConversation = false
|
|
585
572
|
}
|
|
586
573
|
}
|
|
587
574
|
}
|
|
@@ -600,7 +587,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
600
587
|
'LABEL_TO',
|
|
601
588
|
'LABEL_LAST_ACCESS',
|
|
602
589
|
'ARRAY_DAYS',
|
|
603
|
-
|
|
590
|
+
|
|
604
591
|
'LABEL_INFO_ADVANCED',
|
|
605
592
|
'ID_CONVERSATION',
|
|
606
593
|
'UPLOAD_FILE_ERROR',
|
|
@@ -619,11 +606,35 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
619
606
|
'THERE_ARE_NO_CANNED_RESPONSES_AVAILABLE',
|
|
620
607
|
'TO_CREATE_THEM_GO_TO_THE_PROJECT',
|
|
621
608
|
"AddNewCannedResponse",
|
|
622
|
-
"LABEL_LOADING"
|
|
609
|
+
"LABEL_LOADING",
|
|
610
|
+
"DIRECT_CHAT",
|
|
611
|
+
"GROUP_CHAT",
|
|
612
|
+
]
|
|
613
|
+
|
|
614
|
+
const keysHeader = [
|
|
615
|
+
'DIRECT_CHAT',
|
|
616
|
+
'GROUP_CHAT',
|
|
617
|
+
'LABEL_IS_WRITING',
|
|
618
|
+
'LABEL_ONLINE',
|
|
619
|
+
'LABEL_OFFLINE',
|
|
620
|
+
'LABEL_TODAY',
|
|
621
|
+
'LABEL_TOMORROW',
|
|
622
|
+
'LABEL_TO',
|
|
623
|
+
'LABEL_LAST_ACCESS',
|
|
624
|
+
'ARRAY_DAYS',
|
|
625
|
+
'Resolve',
|
|
626
|
+
]
|
|
627
|
+
|
|
628
|
+
const keysContentDetail = [
|
|
629
|
+
'LABEL_OPEN_INFO_CONVERSATION',
|
|
630
|
+
'LABEL_CLOSE_GROUP',
|
|
631
|
+
'LABEL_IS_WRITING',
|
|
623
632
|
]
|
|
624
633
|
|
|
625
|
-
this.
|
|
626
|
-
this.
|
|
634
|
+
this.translationsMap = this.customTranslateService.translateLanguage(keys)
|
|
635
|
+
this.translationsHeaderMap = this.customTranslateService.translateLanguage(keysHeader)
|
|
636
|
+
this.translationsContentMap = this.customTranslateService.translateLanguage(keysContentDetail)
|
|
637
|
+
this.logger.log('[CONVS-DETAIL] x this.translationMap ',this.translationsMap)
|
|
627
638
|
}
|
|
628
639
|
|
|
629
640
|
// --------------------------------------------------------
|
|
@@ -650,6 +661,19 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
650
661
|
return this.customTranslateService.translateLanguage(keys)
|
|
651
662
|
}
|
|
652
663
|
|
|
664
|
+
private setStyleMap(){
|
|
665
|
+
this.styleMap.set('themeColor', 'var(--basic-blue)')
|
|
666
|
+
.set('bubbleReceivedBackground','var(--bck-msg-received)')
|
|
667
|
+
.set('bubbleReceivedTextColor', 'var(--col-msg-received)')
|
|
668
|
+
.set('bubbleSentBackground', 'var(--bck-msg-sent)')
|
|
669
|
+
.set('bubbleSentTextColor', 'var(--col-msg-sent)')
|
|
670
|
+
.set('buttonFontSize','var(--button-in-msg-font-size)')
|
|
671
|
+
.set('buttonBackgroundColor', 'var(--buttonBackgroundColor)')
|
|
672
|
+
.set('buttonTextColor', 'var(--buttonTextColor)')
|
|
673
|
+
.set('buttonHoverBackgroundColor', 'var(--buttonHoverBackgroundColor)')
|
|
674
|
+
.set('buttonHoverTextColor', 'var(--buttonHoverTextColor)')
|
|
675
|
+
|
|
676
|
+
}
|
|
653
677
|
// -------------------------------------------------------------------------------------
|
|
654
678
|
// * retrieving the handler from chatManager
|
|
655
679
|
// * if it DOESN'T EXIST I create a handler and connect and store it in the chatmanager
|
|
@@ -735,6 +759,18 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
735
759
|
}
|
|
736
760
|
}
|
|
737
761
|
|
|
762
|
+
onConversationLoaded(conversation): ConversationModel{
|
|
763
|
+
if(conversation.attributes && conversation.attributes['projectId']){
|
|
764
|
+
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
765
|
+
if(project){
|
|
766
|
+
project = JSON.parse(project)
|
|
767
|
+
conversation.attributes.project_name = project['name']
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
}
|
|
771
|
+
return conversation
|
|
772
|
+
}
|
|
773
|
+
|
|
738
774
|
setHeaderContent() {
|
|
739
775
|
// this.logger.log('[CONVS-DETAIL] - setHeaderContent conversationWith', this.conversationWith)
|
|
740
776
|
// this.logger.log('[CONVS-DETAIL] - setHeaderContent conversationsHandlerService', this.conversationsHandlerService)
|
|
@@ -749,6 +785,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
749
785
|
conv.conversation_with,
|
|
750
786
|
conv.conversation_with_fullname,
|
|
751
787
|
conv.channel_type,
|
|
788
|
+
conv.attributes['projectId'],
|
|
789
|
+
conv.attributes['project_name']
|
|
752
790
|
)
|
|
753
791
|
}
|
|
754
792
|
if(!conv){
|
|
@@ -762,6 +800,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
762
800
|
conv.conversation_with,
|
|
763
801
|
conv.conversation_with_fullname,
|
|
764
802
|
conv.channel_type,
|
|
803
|
+
conv.attributes['projectId'],
|
|
804
|
+
conv.attributes['project_name']
|
|
765
805
|
)
|
|
766
806
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
767
807
|
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -780,6 +820,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
780
820
|
conv.conversation_with,
|
|
781
821
|
conv.conversation_with_fullname,
|
|
782
822
|
conv.channel_type,
|
|
823
|
+
conv.attributes['projectId'],
|
|
824
|
+
conv.attributes['project_name']
|
|
783
825
|
)
|
|
784
826
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
785
827
|
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
@@ -792,6 +834,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
792
834
|
conv.conversation_with,
|
|
793
835
|
conv.conversation_with_fullname,
|
|
794
836
|
conv.channel_type,
|
|
837
|
+
conv.attributes['projectId'],
|
|
838
|
+
conv.attributes['project_name']
|
|
795
839
|
)
|
|
796
840
|
}
|
|
797
841
|
this.logger.log('[CONVS-DETAIL] - setHeaderContent > conversationAvatar: ', this.conversationAvatar)
|
|
@@ -901,37 +945,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
901
945
|
let subscription: any
|
|
902
946
|
let subscriptionKey: string
|
|
903
947
|
|
|
904
|
-
// subscriptionKey = 'BSConversationsChanged'
|
|
905
|
-
// subscription = this.subscriptions.find((item) => item.key === subscriptionKey)
|
|
906
|
-
// if (!subscription) {
|
|
907
|
-
// subscription = this.conversationsHandlerService.conversationChanged.subscribe((data: ConversationModel) => {
|
|
908
|
-
// this.logger.log('[CONVS-DETAIL] subscribe BSConversationsChanged data ', data, ' this.loggedUser.uid:', this.loggedUser.uid)
|
|
909
|
-
|
|
910
|
-
// if (data && data.sender !== this.loggedUser.uid) {
|
|
911
|
-
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange data sender ', data.sender)
|
|
912
|
-
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange this.loggedUser.uid ', this.loggedUser.uid)
|
|
913
|
-
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange is_new ', data.is_new)
|
|
914
|
-
// this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange showButtonToBottom ', this.showButtonToBottom)
|
|
915
|
-
// // UPDATE THE CONVERSATION TO 'READ' IF IT IS ME WHO WRITES THE LAST MESSAGE OF THE CONVERSATION
|
|
916
|
-
// // AND IF THE POSITION OF THE SCROLL IS AT THE END
|
|
917
|
-
// if (!this.showButtonToBottom && data.is_new) {
|
|
918
|
-
// // ARE AT THE END
|
|
919
|
-
// this.updateConversationBadge()
|
|
920
|
-
// }
|
|
921
|
-
// if(data.uid === this.conversationWith){
|
|
922
|
-
// this.conversationAvatar = setConversationAvatar(
|
|
923
|
-
// data.conversation_with,
|
|
924
|
-
// data.conversation_with_fullname,
|
|
925
|
-
// data.channel_type,
|
|
926
|
-
// )
|
|
927
|
-
// }
|
|
928
|
-
|
|
929
|
-
// }
|
|
930
|
-
// })
|
|
931
|
-
// const subscribe = { key: subscriptionKey, value: subscription }
|
|
932
|
-
// this.subscriptions.push(subscribe)
|
|
933
|
-
// }
|
|
934
|
-
|
|
935
948
|
subscriptionKey = 'messageAdded'
|
|
936
949
|
subscription = this.subscriptions.find((item) => item.key === subscriptionKey)
|
|
937
950
|
if (!subscription) {
|
|
@@ -981,6 +994,22 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
981
994
|
this.subscriptions.push(subscribe)
|
|
982
995
|
}
|
|
983
996
|
|
|
997
|
+
subscriptionKey = 'conversationTyping';
|
|
998
|
+
subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
999
|
+
if (!subscription) {
|
|
1000
|
+
subscription = this.typingService.BSIsTyping.pipe(takeUntil(this.unsubscribe$)).subscribe((data: any) => {
|
|
1001
|
+
this.logger.debug('[CONVS-DETAIL] ***** BSIsTyping *****', data);
|
|
1002
|
+
if (data) {
|
|
1003
|
+
const isTypingUid = data.uid; //support-group-...
|
|
1004
|
+
if (this.conversationWith === isTypingUid) {
|
|
1005
|
+
that.subscribeTypings(data);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
const subscribe = {key: subscriptionKey, value: subscription };
|
|
1010
|
+
this.subscriptions.push(subscribe);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
984
1013
|
// subscriptionKey = 'onGroupChange';
|
|
985
1014
|
// subscription = this.subscriptions.find(item => item.key === subscriptionKey);
|
|
986
1015
|
// if (!subscription) {
|
|
@@ -1001,18 +1030,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1001
1030
|
// }
|
|
1002
1031
|
}
|
|
1003
1032
|
|
|
1004
|
-
onConversationLoaded(conversation): ConversationModel{
|
|
1005
|
-
if(conversation.attributes && conversation.attributes['projectId']){
|
|
1006
|
-
let project = localStorage.getItem(conversation.attributes['projectId'])
|
|
1007
|
-
if(project){
|
|
1008
|
-
project = JSON.parse(project)
|
|
1009
|
-
conversation.attributes.project_name = project['name']
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
return conversation
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
1033
|
// -------------------------------------------------
|
|
1017
1034
|
// addEventsKeyboard
|
|
1018
1035
|
// -------------------------------------------------
|
|
@@ -1040,7 +1057,9 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1040
1057
|
this.conversationAvatar = setConversationAvatar(
|
|
1041
1058
|
this.conversationWith,
|
|
1042
1059
|
this.conversationWithFullname,
|
|
1043
|
-
this.channelType
|
|
1060
|
+
this.channelType,
|
|
1061
|
+
this.conversation.attributes['projectId'],
|
|
1062
|
+
this.conversation.attributes['project_name']
|
|
1044
1063
|
)
|
|
1045
1064
|
|
|
1046
1065
|
}
|
|
@@ -1217,7 +1236,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1217
1236
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> beforeSlash', beforeSlash)
|
|
1218
1237
|
this.logger.log('[CONVS-DETAIL] - returnChangeTextArea --> afterSlash', afterSlash)
|
|
1219
1238
|
|
|
1220
|
-
|
|
1221
1239
|
if(beforeSlash[beforeSlash.length-1].indexOf(' ') >= 0 && afterSlash === ''){
|
|
1222
1240
|
this.HIDE_CANNED_RESPONSES = false
|
|
1223
1241
|
} else if(beforeSlash[beforeSlash.length-1].indexOf(' ') < 0 && afterSlash === '' ){
|
|
@@ -1265,7 +1283,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1265
1283
|
|
|
1266
1284
|
replaceTagInMessage(canned, event?) {
|
|
1267
1285
|
const elTextArea = this.rowTextArea['el']
|
|
1268
|
-
const textArea = elTextArea.getElementsByTagName('ion-textarea')[0]
|
|
1286
|
+
const textArea = elTextArea.getElementsByTagName('ion-textarea')[0] as HTMLInputElement;
|
|
1269
1287
|
// console.log('[CONVS-DETAIL] replaceTagInMessage textArea ', textArea)
|
|
1270
1288
|
// console.log('[CONVS-DETAIL] replaceTagInMessage textArea value', textArea.value,)
|
|
1271
1289
|
|
|
@@ -1280,20 +1298,17 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1280
1298
|
// replace text
|
|
1281
1299
|
var strTEMP = textArea.value.replace(/\/.*/ig, canned.text)
|
|
1282
1300
|
strTEMP = this.replacePlaceholderInCanned(strTEMP)
|
|
1283
|
-
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch
|
|
1301
|
+
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch ', strTEMP)
|
|
1284
1302
|
// strTEMP = this.replacePlaceholderInCanned(strTEMP);
|
|
1285
1303
|
// textArea.value = '';
|
|
1286
1304
|
// that.messageString = strTEMP;
|
|
1287
1305
|
textArea.value = strTEMP
|
|
1288
|
-
this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch after', strTEMP, textArea)
|
|
1289
1306
|
this.insertAtCursor(textArea, '')
|
|
1290
1307
|
this.setCaretPosition(textArea)
|
|
1291
1308
|
// setTimeout(() => {
|
|
1292
1309
|
// // textArea.focus();
|
|
1293
|
-
// textArea.selectionEnd = textArea.value.length;
|
|
1294
1310
|
// textArea.setFocus()
|
|
1295
1311
|
// // this.resizeTextArea()
|
|
1296
|
-
// // this.setCaretPosition(textArea)
|
|
1297
1312
|
// }, 200)
|
|
1298
1313
|
|
|
1299
1314
|
}
|
|
@@ -1337,7 +1352,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1337
1352
|
if(elTextArea){
|
|
1338
1353
|
// console.log("[CONVS-DETAIL] onClickOpenCannedResponses textArea value", textArea.value)
|
|
1339
1354
|
var lastChar = textArea.value[textArea.value.length - 1]
|
|
1340
|
-
this.logger.log('[CONVS-DETAIL] onClickOpenCannedResponses lastChar
|
|
1355
|
+
this.logger.log('[CONVS-DETAIL] onClickOpenCannedResponses lastChar --- textArea ', lastChar, textArea)
|
|
1341
1356
|
if (lastChar !== '/') {
|
|
1342
1357
|
this.insertAtCursor(textArea, '/')
|
|
1343
1358
|
}
|
|
@@ -1517,6 +1532,13 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1517
1532
|
}
|
|
1518
1533
|
}
|
|
1519
1534
|
|
|
1535
|
+
onOpenCloseInfoConversation(event){
|
|
1536
|
+
this.logger.log('[CONVS-DETAIL] onOpenCloseInfoConversation - openInfoConversation ', event)
|
|
1537
|
+
this.resizeTextArea()
|
|
1538
|
+
this.openInfoConversation = event
|
|
1539
|
+
this.USER_HAS_OPENED_CLOSE_INFO_CONV = true
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1520
1542
|
// -------------- START SCROLL/RESIZE -------------- //
|
|
1521
1543
|
/** */
|
|
1522
1544
|
resizeTextArea() {
|
|
@@ -1618,6 +1640,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1618
1640
|
this.heightMessageTextArea = '57' // NK edited
|
|
1619
1641
|
}
|
|
1620
1642
|
}
|
|
1643
|
+
|
|
1621
1644
|
checkAcceptedFile(draggedFileMimeType) {
|
|
1622
1645
|
let isAcceptFile = false
|
|
1623
1646
|
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept: ',this.appConfigProvider.getConfig().fileUploadAccept)
|
|
@@ -1639,26 +1662,17 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1639
1662
|
if (accept_file_segment[1] === '*') {
|
|
1640
1663
|
if (draggedFileMimeType.startsWith(accept_file_segment[0])) {
|
|
1641
1664
|
isAcceptFile = true
|
|
1642
|
-
this.logger.log(
|
|
1643
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1644
|
-
isAcceptFile,
|
|
1645
|
-
)
|
|
1665
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',isAcceptFile)
|
|
1646
1666
|
return isAcceptFile
|
|
1647
1667
|
} else {
|
|
1648
1668
|
isAcceptFile = false
|
|
1649
|
-
this.logger.log(
|
|
1650
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1651
|
-
isAcceptFile,
|
|
1652
|
-
)
|
|
1669
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',isAcceptFile)
|
|
1653
1670
|
return isAcceptFile
|
|
1654
1671
|
}
|
|
1655
1672
|
} else if (accept_file_segment[1] !== '*') {
|
|
1656
1673
|
if (draggedFileMimeType === accept_file) {
|
|
1657
1674
|
isAcceptFile = true
|
|
1658
|
-
this.logger.log(
|
|
1659
|
-
'[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',
|
|
1660
|
-
isAcceptFile,
|
|
1661
|
-
)
|
|
1675
|
+
this.logger.log('[CONVS-DETAIL] > checkAcceptedFile - fileUploadAccept isAcceptFile',isAcceptFile)
|
|
1662
1676
|
return isAcceptFile
|
|
1663
1677
|
}
|
|
1664
1678
|
}
|
|
@@ -1668,6 +1682,64 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1668
1682
|
}
|
|
1669
1683
|
}
|
|
1670
1684
|
|
|
1685
|
+
|
|
1686
|
+
initializeTyping() {
|
|
1687
|
+
this.logger.debug('[CONVS-DETAIL] membersconversation', this.membersConversation)
|
|
1688
|
+
if(this.loggedUser){
|
|
1689
|
+
this.membersConversation.push(this.loggedUser.uid)
|
|
1690
|
+
//this.setSubscriptions();
|
|
1691
|
+
this.typingService.isTyping(this.conversationWith, this.loggedUser.uid, this.isDirect);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/** */
|
|
1696
|
+
subscribeTypings(data: any) {
|
|
1697
|
+
const that = this;
|
|
1698
|
+
try {
|
|
1699
|
+
const key = data.uidUserTypingNow;
|
|
1700
|
+
const waitTime = data.waitTime
|
|
1701
|
+
this.nameUserTypingNow = null;
|
|
1702
|
+
this.idUserTypingNow = null;
|
|
1703
|
+
|
|
1704
|
+
if (data.nameUserTypingNow) {
|
|
1705
|
+
this.nameUserTypingNow = data.nameUserTypingNow;
|
|
1706
|
+
}
|
|
1707
|
+
if (data.uidUserTypingNow){
|
|
1708
|
+
this.idUserTypingNow = data.uidUserTypingNow
|
|
1709
|
+
}
|
|
1710
|
+
this.logger.debug('[CONV-COMP] subscribeTypings data:', data);
|
|
1711
|
+
const userTyping = this.membersConversation.includes(key);
|
|
1712
|
+
if ( !userTyping && key) {
|
|
1713
|
+
this.isTypings = true;
|
|
1714
|
+
setTimeout(function () {
|
|
1715
|
+
that.scrollBottom(0)
|
|
1716
|
+
}, 0);
|
|
1717
|
+
// clearTimeout(this.setTimeoutWritingMessages);
|
|
1718
|
+
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1719
|
+
that.isTypings = false;
|
|
1720
|
+
}, waitTime);
|
|
1721
|
+
// this.initiTimeout(waitTime)
|
|
1722
|
+
}
|
|
1723
|
+
} catch (error) {
|
|
1724
|
+
this.logger.error('[CONV-COMP] error: ', error);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
initiTimeout(waitTime){
|
|
1730
|
+
const that = this;
|
|
1731
|
+
this.setTimeoutWritingMessages = setTimeout(() => {
|
|
1732
|
+
that.isTypings = false;
|
|
1733
|
+
}, waitTime);
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
resetTimeout(){
|
|
1737
|
+
this.isTypings = false
|
|
1738
|
+
this.setTimeoutWritingMessages = null;
|
|
1739
|
+
clearTimeout(this.setTimeoutWritingMessages)
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
|
|
1671
1743
|
segmentNewAgentMessage(conversation: ConversationModel){
|
|
1672
1744
|
let user = this.loggedUser
|
|
1673
1745
|
try {
|
|
@@ -1714,7 +1786,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1714
1786
|
this.logger.error('Event:Message Sent [group] error', err);
|
|
1715
1787
|
}
|
|
1716
1788
|
}
|
|
1717
|
-
|
|
1789
|
+
|
|
1718
1790
|
// -------------------------------------------------------------
|
|
1719
1791
|
// DRAG FILE
|
|
1720
1792
|
// -------------------------------------------------------------
|
|
@@ -1774,7 +1846,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1774
1846
|
|
|
1775
1847
|
async presentToastOnlyImageFilesAreAllowedToDrag() {
|
|
1776
1848
|
const toast = await this.toastController.create({
|
|
1777
|
-
message: this.
|
|
1849
|
+
message: this.translationsMap.get('FAILED_TO_UPLOAD_THE_FORMAT_IS_NOT_SUPPORTED'),
|
|
1778
1850
|
duration: 5000,
|
|
1779
1851
|
color: 'danger',
|
|
1780
1852
|
cssClass: 'toast-custom-class',
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
<ion-header no-border class="ion-no-border">
|
|
2
|
-
<
|
|
1
|
+
<ion-header no-border class="ion-no-border" [class.mobile]="isMobile">
|
|
2
|
+
<header-conversations-list *ngIf="conversationType ==='active'"
|
|
3
3
|
[numberOpenConv]="numberOpenConv"
|
|
4
4
|
[supportMode]="supportMode"
|
|
5
5
|
[archived_btn]="archived_btn"
|
|
6
6
|
[writeto_btn]="writeto_btn"
|
|
7
7
|
[sound_btn]="sound_btn"
|
|
8
|
+
[isMobile]="isMobile"
|
|
8
9
|
(onSoundChange)="onSoundChange($event)"
|
|
9
10
|
(openContactsDirectory)=openContactsDirectory($event)
|
|
10
11
|
(openProfileInfo)=openProfileInfo($event)>
|
|
11
|
-
</
|
|
12
|
+
</header-conversations-list>
|
|
12
13
|
|
|
13
|
-
<
|
|
14
|
+
<header-conversations-list-archived *ngIf="conversationType !=='active'"
|
|
14
15
|
[headerTitle]=headerTitle
|
|
16
|
+
[isMobile]="isMobile"
|
|
15
17
|
(onBackButton)=onBackButtonFN($event)>
|
|
16
|
-
</
|
|
18
|
+
</header-conversations-list-archived>
|
|
17
19
|
</ion-header>
|
|
20
|
+
|
|
18
21
|
<!-- appScrollbarTheme -->
|
|
19
|
-
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" >
|
|
22
|
+
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" [class.mobile]="isMobile">
|
|
20
23
|
<!-- class="ps" style="position: relative; max-width: 600px; max-height: 100%;" [perfectScrollbar]="config" -->
|
|
21
24
|
<div id="scrollbar2">
|
|
22
25
|
<ion-list>
|
|
23
26
|
|
|
24
27
|
<!-- supportMode && -->
|
|
25
|
-
<ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item">
|
|
28
|
+
<ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item" lines="none">
|
|
26
29
|
<div tabindex="0"></div>
|
|
27
30
|
<!-- <ion-note class="pinned-project">
|
|
28
31
|
{{ 'PINNED_PROJECT' | translate }}
|
|
29
32
|
</ion-note> -->
|
|
30
33
|
|
|
31
34
|
<app-project-item
|
|
32
|
-
style="width: 100%;"
|
|
35
|
+
style="width: 100%; margin: 0px 8px; border-bottom: 1px dashed #d3dbe5;"
|
|
33
36
|
(openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
|
|
34
37
|
(projectIdEvent)="getLastProjectId($event)">
|
|
35
38
|
</app-project-item>
|
|
@@ -4,6 +4,10 @@ ion-header {
|
|
|
4
4
|
border-bottom-style: solid;
|
|
5
5
|
border-color: var(--light-gray);
|
|
6
6
|
border-bottom-width: thin;
|
|
7
|
+
&:not(.mobile){
|
|
8
|
+
border: none;
|
|
9
|
+
background: var(--list-bkg-color);
|
|
10
|
+
}
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
ion-content {
|
|
@@ -12,6 +16,16 @@ ion-content {
|
|
|
12
16
|
--overflow: hidden;
|
|
13
17
|
overflow: scroll;
|
|
14
18
|
|
|
19
|
+
/* For Firefox */
|
|
20
|
+
@-moz-document url-prefix() {
|
|
21
|
+
scrollbar-width: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
&:not(.mobile){
|
|
26
|
+
background: var(--list-bkg-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
15
29
|
&::-webkit-scrollbar {
|
|
16
30
|
width: 6px;
|
|
17
31
|
height: 8px;
|
|
@@ -40,10 +54,11 @@ ion-list {
|
|
|
40
54
|
list-style-type: none;
|
|
41
55
|
margin: 0;
|
|
42
56
|
padding: 0;
|
|
57
|
+
background: transparent;
|
|
43
58
|
|
|
44
59
|
ion-item {
|
|
45
60
|
cursor: pointer;
|
|
46
|
-
height: 64px;
|
|
61
|
+
// height: 64px;
|
|
47
62
|
position: relative;
|
|
48
63
|
display: flex;
|
|
49
64
|
text-decoration: none;
|
|
@@ -51,6 +66,7 @@ ion-list {
|
|
|
51
66
|
padding-right: 8px;
|
|
52
67
|
--padding-start: 0;
|
|
53
68
|
--inner-padding-end: 0;
|
|
69
|
+
--background: transparent;
|
|
54
70
|
.selected {
|
|
55
71
|
border-radius: 10px;
|
|
56
72
|
padding-left: 8px;
|
|
@@ -324,7 +340,7 @@ ion-list {
|
|
|
324
340
|
padding-left: 0px !important ;
|
|
325
341
|
padding-right: 0px !important;
|
|
326
342
|
// height: 55px !important;
|
|
327
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
343
|
+
// border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
328
344
|
--background-hover: #ffffff;
|
|
329
345
|
cursor:default !important;
|
|
330
346
|
}
|